Posted by – September 26, 2009
One of the features that I always pay attention in a framework is how we can control what can be rendered in a view and what not, many frameworks uses a scriplet language, some others uses a kind of template system for this purpose and a few give to the user a object oriented way to do it.
In this article I’ll show an example of how we can take the control of view rendering on lift framework with the help of snippets. With snippets you will be able to perform any server side interaction that you need, you can call a snippet by placing a tag on view code, this tag has a naming convention required to call the snippet properly, a snippet always emmit markup back to the user.
Posted by – February 3, 2009
Yesterday I finally wrote my first Django application, this application is a basic crud that contains two pages, one to list costumers and another to change costumer data.
My biggest challenge was related with some form features, with Django forms you can programatically create a view form that contains several fields with its constraints and optionally associate a Django widget with this field. Django forms also have a very powerful validation engine and some form field constraints must be defined for this purpose.
This application uses the same page for two purposes, to add new data or edit data, in this scenario I must use a hidden field to be used as flag indicating in which mode the page is, adding or editing data, I must also change the readonly attribute of input widget used by costumer id form field since the user can’t change costumer id.
Posted by – September 3, 2008
Today I downloaded the first public version of Google Chrome, a brand new browser from Google, at first moment Google Chrome looks really good, with a very clean user interface, google usability and a organized interface, I could use GMail and iGoogle without any problems, Chrome can render several other websites and gracefully pass acid2 test,but only passed 79 of 100 of acid3 tests, is it a WebKit limitation?
The only html element that did’t worked as expected was the form input file, I cound’t see the text box of this input element anywhere on the page, only a label that is rendered after the button used to open the dialog window to select the file to upload.
For my JSF applications Chrome worked like a charm, I couldn’t find anything wrong, the autocomplete feature that uses scriptaculous worked without any problems.
Posted by – September 1, 2008
In the next weeks I’ll try to take a closer look on this framework, it has a lot of nice features, one of then is your O/R mapper, very easy to work with, you can create your database using the model classes by running few commands, giving an idea about how much productive this framework can be for database driven applications.
Here’s a example of django model classes:
from django.db import models
name = models.CharField(max_length=200)
phone_numer = models.CharField(max_length=200)
birth_date = models.DateTimeField('birth date')
You can generate the application database containing “friend” table by just running the command python manage.py sql appname and python manage.py syncdb.
But the model layer isn’t enougth on a web application framework, we still still need consider the controller and view layers.
Posted by – August 2, 2008
The scrapy is a very nice software that allows to extract only specific portions of html page, with web scrapping tools you can extract from the web pages the data that you really need, dropping out all layout markup, this software is very easy to use, it has similiar features to kapow but very less expensive.
You can learn more about this amazing framework by clicking here.