I think most people who are used to program with server languages like php and perl have trouble ajusting to javascript as a partner language instead of a supporting language.
To give an example. I've worked on Smooth paginator. The idea behind it is simple. Group pages together by sets to minimize the place taken by the page links. Although it's nice work the one thing that's bothering me is the fact that the sub-group is generated by the php code therefore it is shown when javascript is turned off, The subgroup has no use then. The subgroups need to be generated by javascript to degradate gracefull.
If you plan to migrate from a server script to a more client script approach you have to keep in mind javascript can be turned off or not read by the browser. Try to back-up as much client functionality with server functionality. The way i do it is by creating everything in a server script language and then i'm creating the client script whitch uses methods from the server script through ajax calls. This way you don't have to program the same funtionality twice and you have the new way of handling user actions.
If it's difficult to mimic the javascript behaviour make sure the functionality is not essential for the use of the application.
I've adjusted the smooth paginators code to generate the sub-groups but it has to be approved by the creator of the code. But i'll think he isn't going to be difficult about it because he switched from version .02 to .03 using my rough javascript code. That's surely nothing to be proud of, the improved code is.
No comments:
Post a Comment