Showing posts with label ajax. Show all posts
Showing posts with label ajax. Show all posts

Tuesday, May 24, 2011

Games, Algorithms and Code

Thought of publishing a new post with links to some of our earlier posts to help the users who have joined us from syndicate sites we have recently got listed into.



BTW, all algorithms, some code we produce, analysis in solving some gaming puzzles etc are in the coding blog which is iq-games Our starting puzzle Towers of Hanoi was just complete there (with a staggering series of 10 posts!) That series takes one deep into the world of Hanoi Towers with general cases (what we know most is just a one specific case of the puzzle), multiple towers etc After analyzing the puzzle and sharing ideas and explaining of algorithms, finally the source code has also been shared there, have fun! For absolute beginners on towers of Hanoi, this link should be the starting point. Those who already know the puzzle and the code to solve the basic case of it, can start from here to dig deep. More game analysis, algorithms and code for different games/puzzles will appear in this blog, stay tuned....

At this blog we have discussed about the future of Thin Client and Javascript. We placed our bets on web application to over take desktop applications and similarly languages like Javascripts together with technologies like HTML5 and AJAX are poised to become next big things in the programming world. Like to know more ? hop in!

Newest programming Language! Ceylon!! will it overtake Java ? what's the secret reasoning behind naming it as Ceylon ? (of all names for god's sake!) read Here to find more...

Can meditation help improve programming skills ? What's in common with programming meditation and Chess ? You will find few more questions and even fewer answers in here.

Finally, what we are about. The Free for all online gaming site!

Sunday, March 13, 2011

Destiny of the Thin Client and Java Scripting


Applications which run on web browsers are getting expanded by the day. Some are things which (just few years ago) we didn't even believe was possible to have on a web browser. Anyway, the purpose of this article is not to debate the life time of desktop applications. May be some other day... but not today.

For the arguments sake, let's just say that there are more and more applications now running on top of a browser (thin client), Hence in future there will be many many apps written in scripting languages which runs on browsers.

Let me share with you few experiences I had recently come across on the programming front, the thoughts they generated and their conclusions. To make it bit interesting, I will disclose the conclusion first, then we would discuss the reasons for it.

Conclusion (my prediction for future) : Java Scripting (or something similar) is destined to conquer the programming world!

there... I said it! Some might say Java Scripts have already conquered the world.

For others, here are my reasoning :

Like mentioned before there will be more number of web based applications/products in future than desktop applications. This client is winning the war against the thick client. Javascript is designed to run on thin clients, the platform which is most common and will be most supported in future. (if not already!)

Programming is now moving once again towards dynamic, loosely typed languages which offer more flexibility and productivity to developers.

This is why people embrace new languages like Ruby, when C++ like languages are increasingly looked down upon. Strongly typed is no longer considered a good thing, not necessarily. Steve Yegge has apparently become so frustrated with Type Safety that he has written this little (well...,  long actually) story about TS (Type Safety). Power of dynamic programing languages is very attractive and top programmers are already either  migrated, migrating or considering doing it. Here migration is from C++, Java .Net worlds into the worlds of Ruby, Haskell, Lisp etc. To me it seems like the Virtual Machine concept is the only thing which keeps Java alive right now. They have the best VM so far designed, as soon an alternative VM comes for another language (or one which supports multiple languages) things would start to look more interesting.

Java Scripts are dynamic, not strongly typed and very flexible. A language which has a huge potential when compared to the existing giants like Java, C++ etc. There is a common perception that Java Scripts is really simple, naive, not even real programming. This perception is set to change dramatically in the coming few years!  As for a little example, consider how easily you can pass a function as a parameter to another function in java scripts. Read this (With Joel's skillful way of hammering a point through) as well for the ways that can be important in modern programming. I think Java Script has got the basic concepts right in contributing towards building the next big thing in programming languages.

Reasons ?

1) Ajax and so called Web 2.0 - Ajax (and it's fancy but unfortunate marketing term Web 2.0) has made a mental shift in web aplication programming. User freindly, fast, smooth dynamic applications are now the norm and expectation. Web application is supposed to be very interactive and super fast isn't it ? almost like a desktop application. Well, that's how peoples expectations have shifted.  Think about the effect of this shift on programmers. Ajax means more and more javascripts. More and more advances and cool javascripts. Good skills in Ajax and Javascripts is now becoming a must for a web developer while old giant frameworks like Struts are made to look bulky and outdated in comparison.

2) JQuery : what do we think about javascripts as soon as we hear the word ? a very unreadable spagetti, old C like code, which is somewhere between html and proper programming. Series programmers will not making their hands dirty with that jargon.... well, that was how it was until few years ago, Things are changing now and the change will grow even more rapidly in coming few years. Jquery is a good example for neat, organized library of javascripts. Some vital, so far missing component to popularize this technology. This is a sign of things to come. More and more cool and smart libraries like Jquery will apeear and that will shift the Javascrip language into a new level in terms of usability, re-usability, readability, efficiency and all.

3) V8 & Nitro : Other vast improvement is made from the side of Javascript rendering engines. Google's V8 in Chrome and Apple's Nitro in Safari seems best out there right now but Firefox is not far behind either. This will provide the necessary muscle to run JavaScript code faster and will act as a catalyst to fasten the growth of the technology. More and more tasks will be feasible to run on a browser using JavaScript to power them.

4) HTML5 : HTML5 (and the new element canvas, among other things) is a cool technology which is clearly the future of HTML. This will raise the profile of thin client applications in to a new level. It will also increase the role of javascripts

5) Problems in other rival technologies : Adobe Flex, Macromedia MS Silverlight and other technologies all have problems. None of them as popular, well known and available as Javascripts are. None of them are as readily available everywhere. More importantly, none of them are as commonly accepted by all as javascripts. Problems between Apple and Adobe on iPhone Flash support is just a one example. HTML5, Ajax and improves version of Javascript is well poised to take over the dynamic application development on thin clients.  That will also provide standard compliant, universal, free alternative for all.

6) Anatomy of a modern web application : When we look at modern web applications which offer lot of dynamism, interactivity and finer smoothness of operations for the users, one trend become noticeable.  More and more interesting and smarter code is being written at the front end. Less and less smarter critical code is being written in the back end.

     Now, I 'm not saying all cool, critical code should be written in the front end in javascripts. What I'm saying is that we are used to the notion that almost all activities of a web site happen in the back end and only the dumb, non-critical, display related activities are done in the front end. This thinking is chanigng now. (probably not as fast in enterprise applications as opposed to all other applications, but enterprise applications in themselves is loosing the significance, well. we will discuss that in some other post.) What I find is with the use of Ajax, Jquery and with all other nice feature we could provide to the user using those, we find much more code is being written in the front end. Much more than there used to be! This fact requires recognition and that will also lead to more attention to front end code. (Will put up a seperate article detailing this based on our own development experiance) Skills of writing good Ajax/Javascripts code will be more appreciated while more and more frameworks and technologies would appear to solve the development problems of these parts in web applications. What will all this lead to ? it will raise the profile of Javascripts and it will come to the forefornt of technologies.
 


However, there is a one last improvement remaining to happen. We will need a new name for Java Scripts! Already JS is very different than how it was until few years ago but the perception of it is yet to get updated. If it is to be the new and next big thing, it will surely need a much better marketable name that JS. Any suggestions ?