CSS and Tables: The hype and the trendsGet Web Design Tips and Tricks on mps-web-design.com. CSS and Tables: The hype and the trends topic will increase your understanding on Web Design Tips and Tricks. We at mps-web-design.com only provide news, articles, information in Web Design Tips and Tricks. Web Design Tips and Tricks at mps-web-design.com provides the most up to date news and articles. If you have questions please do not hesitate to contact us.
The History of tables Before tables came along, the web was a pretty dull place. Using tables for layout opened up new vistas of possibilities of visually 'designing' a page. It could well be argued that table based layout was responsible for the popularity of the web and the field of web design. Worse still, over the last few years, table based layout has come under severe criticism and was widely demonized. Web purists claim that tables were never meant for layout so one shouldn't use them for such. A rapidly progressive hype seems to be in the air all around. Reality behind the hype Despite the fact that pioneers have been talking about web standards for a long time, the majority of web sites are still developed using tables and non standards compliant code . History has shown many examples of technologies that started out life with one purpose, only to end up finding more practical applications as something else. And it sounds very apt in case of tables. The web itself was never intended to be a channel for edutainment, marketing and information but for sharing research data. Using tables is a pragmatic approach, if not preferred The W3c Web Accessibility Guidelines recognize that designers will continue to use table for layout - and so include information about how they can be implemented in the most accessible way. Designers are not going to immediately stop using tables for layout; mainly owning to the reason that this is the default behavior of most WYSWYG (what you see is what you get) Web design packages and; CSS for layout is so difficult to implement successfully. Moreover, Professionals still argue the use of tables for the layout of pages on the Web, despite the fact that this goes against current standards. They argue it to be a pragmatic approach - if not their preferred options. Let's explode the myths: CSS vs Tables Most web designers don't simply feel the need to switch over The majority of web sites are still developed using tables and non standards compliant code. Because of this, user agents will be forced to handle table based layouts for many years to come. This effectively negates one of the biggest selling points for web standards. That of forward compatibility. That's why, most web designers really don't feel there is an overwhelming need to start developing sites using CSS based layouts and standards compliant code. CSS development has a much higher barrier to entry than table based design While comparing table based design to CSS based design, the syntax of CSS, for sure, turns out to be is pretty easy. Nobody in their right mind would argue that you need too be a rocket scientist to learn CSS. Nevertheless, some of the concepts can be quite tricky to assimilate. Continuing in the same spirit it is true that there are so many bugs, even the 'experts' find themselves spending an inordinate amount of time bug fixing. For a novice this must be extremely frustrating. Not knowing if the problem is down to your misunderstanding of CSS or some obscure browser bug. Perhaps this is why many people see web standards as 'Ivory Tower' and why many web standards advocates come across as having a sense of superiority and a zealous attitude towards web design. Some things are just easy-to-do with tables People often find themselves writing fairly complicated CSS to do something that would be trivial using tables. Take form styling for an instance. It's possible to lay out even very tricky forms using tables in just a few minutes. You can achieve similar results by floating elements with CSS, but it's a lot more involved. If you're a CSS guru it's all part of the fun. However if you're a regular mortal, it can be incredibly frustrating. Another such thing is page footers. It's pretty easy to do using tables. Whilst doing this using CSS alone, it would hardly be any wonder why web developers turn their back on CSS when even simple things are rendered so If you have the knowledge and patience, you can do most things using CSS that you used to do using tables. Sure it may take you longer, but you'll get there in the end (or die trying). CSS benefits. But does it provide you what you need? It's true that switching a large site to a CSS based layout can save a huge amount of bandwidth. However, for most sites, this saving would be insignificant or mostly irrevelent. People want fast loading pages and many advocates have suggested that CSS helps accomplish this. For most sites, the 'design' is spread evenly across the whole site. However with CSS based sites, the 'design' is usually held in one or more external files. These files can be fairly complicated, and even for a simple site, can get big, or even fast. Search engine friendliness: CSS vs Tables It's true that the search engines like semantic pages. It's also a widely held notion that search engines like lean code. Building a site using CSS and web standards can defiantly encourage the development of search engine friendly sites. However it's neither magic bullet, nor a panacea either. There are many table based sites that score very highly in the search engines. It's equally possible to build a CSS based site that gets a terrible search engine ranking. The most important thing for high ranking is content and inbound links, not whether a site uses tables or CSS for layout. Issues pertaining to accessibility There is quite increasing number of people who try to sell web standards and especially CSS based design by playing on client's accessibility fears. There isn't anything inherently inaccessible about table based design. While it's true that your site needs to be published to a recognised set of grammars to get an AA accessibility rating, tableless design is only a recommendation, not a requirement for the more stringent AAA rating. The final word Final Table based design will be around for a long time. However, it is not good enough just to say that it is wrong to use them . In certain circumstances using tables for layout can make much more sense than CSS. Web standards and CSS based design are defiantly the way forward. However in the rush to advocate these 'new' techniques, people end up being hyperbolic and the reality falls short of expectations. A sensible approach to get what you continue to seek is the need of the hour regardless of what is in vogue, or blown out of proportions.
Some simple suggestionsWell I don't consider myself an expert, I do have experience with working with larger datasets and there are a couple of things that I always do to keep queries performing well. Optimize Queries with EXPLAIN
Optimizing joinsSingle sweep what?
Why is this important? Imagine a main table - tableA - with 80,000 rows of data. This table has a corresponding n:n table that maps entries in tableA with a locations table. A query could be written as: SELECT tableA.*, locations.location from tableA Left Join tableA2locations on tableA2locations.tableA_id = tableA.id Left Join locations on tableA2locations.location_id = locations.id where locations.location = 'sometown' Keeping the above quote in mind, MySQL will read a row from the first table and join the corresponding data from the joined tables for that row and then sweep thru the rest of the data, joining as it goes along. This leads us into the following section. Number of rows needed to execute a query
From the above, you can determine that for a query on tables that have not been properly indexed, a join can quickly become unwieldy when dealing simply with three tables with records in the thousands (1000*1000*1000 = a slow query). See HackMySQL for a good example of this. Reducing the number of rows needed to execute a querySo beyond indexing properly for joins, you can still end up with a query that runs in a way that causes a bottleneck. Taking our example from above, imagine that we use a where clause that limits the tableA selection to half ( SELECT tableA.*, locations.location from tableA Left Join tableA2locations on tableA2locations.tableA_id = tableA.id Left Join locations on tableA2locations.location_id = locations.id where locations.location = 'sometown' and tableA.foo = 'bar' This starts us out with 40,000 rows of tableA data to examine. If there are a further 2000 rows from tableA2locations, thats 800,000 rows of data. Not astronomical, but significant. If this was a 3 or 4 table join, things could get ugly. What to do? The answer may be obvious to some: select first with the most limiting table: SELECT tableA.*, locations.location from locations Left Join tableA2locations on tableA2locations.location_id = locations.id Left Join tableA on tableA2locations.tableA_id = tableA.id where locations.location = 'sometown' and tableA.foo = 'bar' This starts us out with 1 selection from the locations table, then 2000 from tableA2locations. If the join between tableA2locations and tableA is indexed correctly, we are then left with an index join based on ID, rather then having to initially select 40,000 rows from tableA as in the previous example. When I first started programming, it made sense to me to select from the main table (tableA) and join the lookups. But once you add some data to the mix and start to play with For further reading on the topic, I always send people to HackMySQL when they ask, so for more tips and tricks, be sure to have a read thru the optimize section of that site. Article Index: | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 |
More Articles:1. Guide to Internet Business - Website Setup After planning the design and content of your website, it's time to actually physically set up your website. This is the step where you put all your designs and plans into action, creating a website that will attract visitors and earn income.a) WEBHOSTINGA webhost is a company that stores the pages and pictures and other files of your website. When a person visits your website, they will request these files from your webhost's server so they can view the website. When choosing a webhost, be care… 2. Imitation, The Smartest Form Of Flattery By David Geer Unless you are an inventor, most likely you are selling a product or service that is being offered by someone else, somewhere, at some time. The first person to start your type of business would have gone through a lot of trial and error. Thank that person, as now you can not only profit by not repeating the same mistakes, but by learning what they do to get business.The best way to do this is to practice what any businessperson knows: know your competition. The most beneficial thing you can d… 3. Business cards on the way If you run in most business companies, for sure they are into whatever techniques and strategies of how to boost and increase their standard and name. A business card definitely is one of their ways and means to keep up with the sales and marketing. Almost all business companies and organizations provide themselves with business cards because it has been proven to have increased sales and franchise. Business cards have been very helpful in many ways. Chances are you will be having most chances o… 4. Are Web Templates Worth It? By Dennis Dadey (c) 2004First off, I am a designer. Now you're thinking, here's this guy trying to convince me to hire a designer costing a few hundred to a few thousand dollars instead of buying a pre-made web template for about $60. Well, these days most companies don't have the money to invest in a costly web site and there are thousands of hungry web designers out there, plus now there are web template resources. These resources can equal great value and effectiveness for the customer as we… |
||||