Wednesday, July 18, 2007

Reviews: Django, CSS, jQuery and DreamWeaver oh joy

One saying from my youth that has stuck with me was from my drumming instructor: "It's good for your beat to be ballsy, but the balls have to have hair on them." I took the meaning to be that a great idea isn't enough, it must be executed with finesse.



I am near completion of the secret project that I undertook a few months ago. With luck it will be unveiled in the next few weeks. Right now I am rewriting earthbrowser.com, which hasn't had a major update since 2003. I've had to update my skill set in the web design arena, since I have to do everything in this little business and I've learned some little nuggets that may be of use to someone. On to the tool review...


Let me just say right now that I don't understand why Dreamweaver exists. It has a very complex interface and set of features, so it looks like it is for professional web designers right? After trying to use it and spending all my time in the incredibly weak text editor to edit the HTML code, I just started using TextMate. I conclude that any expert web designer will just be editing the raw html source. Beginners will be overwhelmed by the options and difficulty of changing settings through the dialog box interface to the raw code. Again, who is the target market for Dreamweaver?


On to the server logic. I've looked at several CMS (Content Management System) packages such as Drupal, Joomla, ExpressionEngine, TurboGears and Django. I've decided that I'm pretty much done with PHP because it is so lame. Does anyone use Perl anymore? That leaves me with my preferred scripting language of Python and Django won the initial test phase hands down.


Django is actually very simple, it basically consists of models, views, url parsing and a templating system which are all nicely intertwined. You server parses the incoming url request and sends all the request info to a view function that you define. From there you can choose what models (if any) are involved in the request along with any other data, perform operations on that data like sorting and filtering, then pass it to the templating system where it can fill in subsections of your pre-defined HTML template. It took about 5 minutes to make a webpage that listed all of the recent earthquakes over magnitude 4, sorted by most recent and provide a link with a relevant title for each. Of course that doesn't include getting that quake information updating into the database, that is a whole other story. There are also nice little modules to do RSS or Atom feeds, blog posts and many other neat features. I'm now rewriting my purchasing system in Python instead of PHP and I couldn't be happier about it. If you are in search of a CMS for your site and don't have your heart set on PHP, you must try Django.


I've decided that giving my site that Web 2.0 feel isn't enough, I'm going with web 2.1. Learning CSS is now mandatory, it isn't that complex, just the ability to set up some inherited styling options for HTML elements. You just have to know what tags you are using and what styling options look best for what you want your site to look like. jQuery is fast becoming my friend and I haven't even done much with it yet. It is a set of Javascript functions that lets you alter the structure of your site when certain events happen, like the page loads or a button or link is clicked. It abstracts away the XMLHttpRequest, handles JSON data, animates elements and a lot more. If you design websites, use it!


In conclusion, if someone were to ask me what they would use to create a fairly complex website I would say set up a dedicated server with Apache, MySQL running the Django framework for the server side logic, edit your HTML and CSS with a nice text editor like TextMate and use jQuery for the client side logic. Don't bother with Dreamweaver.

12 comments:

Sean said...

If you picked PostgreSQL, you could use GeoDjango.

http://code.djangoproject.com/wiki/GeoDjango

matt_giger said...

Thanks Sean, I've seen that and am intrigued, but I have a love/hate relationship with GDAL and have never tried GEOS. I plan on using GeoDjango for a server back end to my application at some point. Vanilla Django is good enough for the website right now, but that might change...

Satri said...

Yes, some still use Perl... such as we do at Slashgeo.org, because slash is mainly coded in perl... As you might already know, we added GeoRSS and GoogleMaps/OpenLayers support to slash!

Cheers :-)
Alex

Anonymous said...

umm why do you label django as a CMS?

matt_giger said...

For lack of a better classification. It is listed up there with Drupal, Joomla and all those others. Yet it is so much more...

Brian said...

Hi. Thanks for your information on Django. Reading your post got me started and I decided to download Django and give it a try. I wanted something to start my own (first) website. I've been playing with it for a few days now. With Django, it's fairly quick and easy to make a functional website, but it's clearly lacking in areas where a true CMS shines. For example, it offers nothing (except the templates and framework code) to help a developer with the customer facing side of the app. The admin side is nice to have, but there is nothing forward-facing out of the box. You need to build it all.

From Django's own FAQ:

"No, Django is not a CMS, or any sort of “turnkey product” in and of itself. It’s a Web framework; it’s a programming tool that lets you build Web sites.

For example, it doesn’t make much sense to compare Django to something like Drupal, because Django is something you use to create things like Drupal"

alexia said...

Good answer, I am looking for the solution of the same question. Find the movies or mp3 you are looking for at myrapida.com the most comprehensive source for free-to-try files downloads on the Web

seo perth said...

I stay away from complicated platforms such as JQuery and Django. It is HTML and CSS for me via dreamweaver.

seo rashid said...

seo perth,We are SEO specialists located in Perth We provide Search Engine Optimisation for seo,search,
Perth Businesses and individuals Get on page one of google today seo Cottesloe,

Drupal Git said...

Choosing the right Content Management System is extremely vital to your success I develop with Drupal. Because When I discovered the top nonprofits use Durpal, I got really excited For my hosting I picked Pantheon with features like Git version control What software have you used?

Robert Linde said...

Originally, website domain names ending in ".org" were intended for nonprofit ... Hire a web designer or company to create the pages of the website. ... required for search engine optimization, quality of content,usability and aesthetic appeal. shopify theme manager

marko said...

Having satisfactory information can direct the client to complete the procedure right. About 2.2 million clients are confronting the issue of dispossession since they are stuck in the middle of the flexible home loan rate that a bank charges and can't profit the advantage of renegotiate. Payday Loans