ICeDEv’s Blog

Tutorial:Building-grid-with-livesearch-form–chapter-1

Posted by: icedev on: เมษายน 2, 2009

Image:diagram_2.jpg

So some explanation

1) Formfield

The formfield is where the user types in the name. On each stroke, the input will be given to the datastore.

2) Datastore

For those who uses Adobe Flex, they will see a familiar concept. Datastore basically holds the connection to your server-side script/xml/array data. The Datastore also has a reader. The reader maps the incoming data from your datasource (server-side script/xml/array) to objects so other components can access these objects.

3) Grid

The grid component basically just binds itself to the Datastore, meaning every time the Datastore receives new data and is rendered through the reader, the grid just updates itself (Adobe Flex anyone?). The grid wil get the data from the reader, but the grid will decide which fields will be exposed to the visitor. For example, the reader can have the following fields: FIELD_1, FIELD_2, FIELD_3, but the grid just shows FIELD_1 and FIELD_2.

4) Serverside script

When the formfield passes data to the Datastore, the Datastore performs a HTTP GET or POST (depending on what you want) to your server-side script. The server-side script then queries the database and results are returned to the Datastore. Before the server-side returns the results, it converts the data to JSON data. When the Datastore has received the JSON data, it will pass it to the reader and the Datastore has new data so all the components that are bound to the Datastore will be updated.

What is “A Big Application”?

Posted by: icedev on: เมษายน 2, 2009

If you have a Viewport with BorderLayout, a grid and a form all in one file it certainly is not the big application, right?. If you have tens of windows each with a grid, form or border layout in it in tens of files it certainly is the bit application, right?

(Germans have very nice word: Jein which is combination of Ja = Yes and Nein = No.)

The answer to both above statement is Jein. When the application becomes big, then? The answer is simple: It becomes big when you feel it is big. It is the point when you start to have troubles to orient yourself in number of files or in you have troubles to find a specific place in one file, when you cease to understand relations of components, etc. I am writing you here but imagine when a 2-3 grades less experienced programmer starts to have this feelings.

We can safely state that each application is big as also a small application deserves to be well written and it may likely become really big as we start to add new features, write new lines of code, new CSS rules, etc.

The best and the safest state of the mind at the start of a new application is: I’m starting the big application!

Hello world!

Posted by: icedev on: เมษายน 2, 2009

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!


  • ไม่มี
  • Mr WordPress: Hi, this is a comment.To delete a comment, just log in, and view the posts' comments, there you will have the option to edit or delete them.

หมวดหมู่

คลังเก็บ

Follow

Get every new post delivered to your Inbox.