2010年11月28日 星期日

HTML5 VS Flash

HTML5 has been out for several years. The design of this public standard is to provide more advanced functions like flexible canvas, video support and browser database. The standard aims to provide better web experience without the use of proprietary software like Flash. In this year, Apple refuses to support Flash in their Iphone OS. According to Apple, the reasons for this decision are problems in battery life, security and performance [1]. Instead of using Flash, Apple has chosen open standard like HTML5, CSS and JavaScript. Can HTML5 replace Flash in the future? Let’s look at the advantages of both technologies.

HTML5, as stated before, aims to provide better web experience and support more on graphics and video which was mostly supported by Flash in the internet. While it provides some common feature that Flash has offered, it also has other advantages over Flash. The advantages are open standard, high performance and favorable for mobile devices.

Unlike Flash, HTML5 is a truly open standard which can be freely used by any browsers or parties and it is supported by a many companies like Apple, Google and Microsoft. This means that it will be available in nearly all browsers and platforms in the future without installing any plugins. This is a huge advantage over Flash which has limited supports in platforms other than desktop OS and requires plugins installation. After all, not all people know how to install a plugin and that’s why Internet Explorer is still the dominating browser. Also, compared to Flash, it doesn’t require developers to buy any tools and there will be likely free open-source tools for development of HTML5. Therefore, being open will gives HTML5 more users and saves development cost.

Performance is one of the weak spot of Flash. However, according to the test made by readwriteweb [2], the perofrmance difference between HTML5 and Flash is not that huge in Windows. However, when it comes to Mac and Linux, HTML5 generally provide better performance because Flash doesn’t support hardware acceleration in these platforms. This may make the users of Mac and Linux prefer HTML5 over Flash.

HTML5 is more favorable for mobile devices than Flash. Flash is only supported in a few mobile devices and doesn’t support hardware acceleration. Also, Flash in mobile phone may drain battery fast. The overall user experience is not good. On the other hand, HTML5 is supported by Saferi, Opera and default Android browser and doesn’t have above problems. Also, most Flash sites are not designed for mobile phone and don’t fit the screen size of them. This is not an issue for HTML5 as mobile phone browser optimized to present its content in a different way which is more suitable for mobile phone. HTML5 is better for mobile phone as it doesn’t drain much battery and have better user experience.

So far, we have seen the advantages of HTML5. It is the time to see the advantages of Flash. Flash is more robust and have a lot of website using it as a working solution.   

Flash is more robust than HTML5 because it is designed as a multimedia framework and HTML5 is designed as a presentation language. This means that Flash is designed to support any formatted multimedia applications and can be used to develop complex games without spending too much effort. HTML5 is in fact still a language for presenting information on a page. Although HTML5 still can be used to create interactive web application, the effort for doing this is larger than using Flash. Designers can create animation and simple games in Flash without coding. This let designers to concentrate on more high level design. HTML5 may have similar tools in the future. However, now Flash is better than HTML5 in development.

There are a lot of websites using Flash for its multimedia content presentation. There is no point for them to change their platform to HTML5 because Flash is proven as a working solution for them and changing platforms means extra cost. On the other hand, a lot of designers and developers are used to Flash. They will not change their platform easily as both HTML5 and Flash offers similar functions in many aspects and Flash has even better development advantages. Therefore, those website and developers will insists on their old preference and continue to use Flash.

We have seen a lot of advantages that both technologies have. To sum up, HTML5 has better support for almost every platform and will provide better overall user experience in mobile platforms. Flash provides better functions and development tools for designers and developers. Also, it is used by a lot of websites and is proven as a working solution. Can HTML5 replace Flash? Although HTML5 provides a lot of advantages that flash don’t have, Flash still is the most popular platforms for interactive multimedia web applications. This is not changed easily. In my opinion, both HTML5 and Flash will coexists in the internet and internet is large enough for both of them working together.




















Reference

Dynamic programming languages advantages in Web development

Dynamic programming languages are very popular in recent years. It is said that using dynamic programming languages like Python and Ruby(In the following sections, dynamic programming language refers to Python and Ruby) takes only one-third to one-fifth development period of traditional programming language like Java to create an equivalent program. However, they also have a disadvantage that they run normally slower than traditional programming languages Since there is no the best programming language without specifying a context, today we are going to discuss about the advantages of dynamic programming languages over traditional language in web development. There are 3 advantages. They are duck typing, Metaprogramming and framework.

Duck typing is dynamic typing that the functions and attributes set of an object defines the current semantics, but not the inheritance form certain class or implementation of certain interface defines it [1]. In duck typing, when you invoke a member function or access a member attribute of an object, you actually send a message to it. If it can handle it, it handles it. If not, it raises an error. Duck typing allows programmers to be more productive because of three reasons. First, programmers write fewer codes for declaring the objects. Second, programmers most likely don’t need to wait the compilation time like in most static typing programming languages. Third, programmers do not need to implement code for checking or typecasting an object. All the above factors affect the development time in the coding aspect. Moreover, duck typing enables the development of some very important framework for web application development like Ruby Rails or Django for Python which are almost impossible to be developed in traditional programming languages like Java because it doesn’t have duck typing. Duck typing in dynamic programming languages save a lot of development time on all kinds of applications including web applications and provide great framework which traditional programming languages cannot offer.

Metaprogramming is to write a program that write or manipulate other programs as their data [2]. In fact, it is about to write a program which create another program according to its data at run time. This feature is not used by most programmers in normal case, but it is in fact one of the most important features for creating a generic framework or library and programmers may get benefit directly from these framework or library. This is also another reason that those frameworks like Ruby Rails or Django for Python is not possible to be created by traditional languages like Java. Overall, Metaprogramming is the key for creating great framework like Ruby Rails or Django for Python for web application development in dynamic programming languages.

Framework is the key advantage among all advantages that dynamic programming languages have. Here Django for Python will be used as an example for analyzing how this framework affects the productivity of web application development and Java will be used as an example for our comparison. Django’s design philosophy is to reuse any modules or what we call apps and bundle these reused modules or apps into a larger application. A killer feature of Django is the apps called admin interface. This admin interface is code generated UI interface that allows the users to manipulate the data in database like listing, searching, filtering. This is in fact the job that many Java developers do everyday. There are other languages that offer the same or similar functions, but none of them offers to a level matched with Django. The admin interface can work out of box without any modification or customization and can be more beautiful and have even more features than a hardcoded admin interface created by programmers. With the new tools on hand, programmers can be more productive and concentrate on high level design like what database items the page should show or which field should be allowed to be deleted by the users. From this example, we can know that a good framework is really important for any programming languages to be productive in web application development. Django admin interface is not the only example for this, but we are not going to dig into the details of other example. With the great framework like Django and Rails, dynamic programming languages are becoming even more powerful than any traditional programming languages.

In conclusion, dynamic programming languages are more powerful than traditional programming languages in web development because they have duck typing, Metaprogramming and mostly important great frameworks. However, as I have already stated in the first paragraph that dynamic programming languages are normally slower than traditional programming languages. The most important thing is to select the right tools for right place and dynamic programming languages win in the game of web applications development.

Reference

Web 3.0

Recently, the term “Web 3.0” has been very popular on the internet. However, there is no real definition on what web 3.0 is. Google CEO Eric Schmidt[1] was asked about the definition of web 3.0 at the Seoul Digital Forum. He said that while Web 2.0 was based on Ajax, Web 3.0 will be "applications that are pieced together".  - with the characteristics that the apps are relatively small, the data is in the cloud, the apps can run on any device (PC or mobile), the apps are very fast and very customizable, and are distributed virtually (social networks, email, etc). While it is true that application will be pieced together and available everywhere as said by Eric Schmidt, What are the applications that web 3.0 will bring to us? What technical problem we are facing.

In my point of view, the features of web 3.0 include cloud computing, web operating system (WebOS, here not referring to palm webOS) and the ubiquitous nature. After we discuss that, we will look into the technologies and challenge of implementing web 3.0.

Cloud computing has been talked for years. It includes two parts – computing and storage. With cloud computing and storage, our terminal machines (pc or mobile phone) don’t require heavy computational power and storage space as before and can access the same set of data and applications via internet. Heavy computing work can be assisted by the server depends on computational power of terminal devices. Nowadays, computer games with great graphics can only be played in high performance computers. With the assist from servers, we may play the same game on both our mobile phones and desktop computers. This also benefits the gaming companies because all game files are located at the cloud and this help to protect against private copies. Cloud storage also provides great flexibility and adaptability on Files. Files can be placed on cloud and can be accessed anywhere with any machines (ie. Desktop and mobile phone can access the same set of data on the web). However, this can be done in old days via ftp or samba. The innovation here is we can access those data in real time. For example, people use either their mobile phone or mp3 players to listen to music on travel. If we can have a faster network, all files in the cloud servers can be accessed by mobile devices like they are stored in the devices. Moreover, file backup are done by professionals of webOS providers and we can forget the pain on losing our data. Overall, Cloud computing requires less computational storage power of our handheld devices for heavy work and provides consistent and reliable data storage.

Web Operation system is a composition of all available web applications like instant messengers, email and google doc into a single website for accessing. However, the story doesn’t end here. When WebOS partners with cloud computing, it will be even more powerful than traditional OS like Windows and Linux. WebOS provides provide extra computational power and reliable storage via cloud computing. This gives webOS an advantage as we can access the same webOS, applications and data everywhere with just an internet browser. As WebOS will be used everywhere with different hardware, the interface will be highly customizable. For example, a user can define different UI-one for mobile phone, one for desktop computer and one for iPad. The WebOS can detect which platform you are using and change the UI, applications and even services accordingly. Applications will be highly integrated in the WebOS. Unlike traditional OS like Windows, there is no centralized software stored for buying software. WebOS will provide an online store for buying applications, ebooks, music and movies. Users can read their ebooks, listen to their music and watch their movies via WebOS at anytime anywhere. Traditional web services like file hosting (eg. ftp), webpage hosting will all integrated to WebOS. Users can design their own webpage or define shared file folder for friends with drag-and-drop tools. Social network will be integrated in the WebOS. It will provide all the existing functions of current social network website like facebook, but allow users to share almost everything they like(suppose it is not copyrighted) in the network easily because all the files, musics and applications are all hosted in WebOS. WebOS will become a gateway for user to access their applications, contents and data at anytime anywhere with just a single web browser and it will also be an entrance in the internet to allow users share their   thoughts and lives.

The ubiquitous nature of web 3.0 is the key to access all features and applications of web 3.0. Without the ubiquitous nature, no matter how many great things we have on the internet, we just cannot access them. 3.5G or 4G mobile phone networks are very important to Web 3.0. With our smartphones, we can access all features of webOS via mobile network. However, the ubiquitous nature doesn’t only mean that. We will have most of our electronics devices connected to the network and can be access via our WebOS. Let’s look at an example. Some researchers at New York University's interactive telecommunications program have come up with a device that can let the plants tell the owner whenever they need water or have too much water via the social network blogging service Twitter[2]. To extend the idea here, we can have our lighting and air conditioner connected to our WebOS. For example, when we leave our home, the position of users is sent by the mobile phone to our WebOS and all the unused electronics deivces like lighting, air conditioners will be turned off. When will are going to come back home, we can remotely control our air conditioners to turn on 10 minutes before we arrive home. With the ubiquitous nature of web, not only we can access the internet anytime anywhere, but we can also access all of our electronics devices anytime anywhere. The ubiquitous nature of web will change our lives.


We have looked into the features of web 3.0, let’s look at the technologies required to implement it and the potential problems we may need to tackle. The most difficult part to implement web3.0 is to have a fast, stable and ubiquitous network. Mobile network is almost ubiquitous, but is it fast and stable enough? With our current 3.5G network, it can provide up to 14Mbps downlink speed [3]. The value seems fast enough, but it is just an ideal value. The service can be much slower in some indoor area. This should affect a lot of new usage of our new features. Therefore, 4G network will be introduced and the target speed is 100Mbps. However, since it still doesn’t cover many places, we may need time to see if it really can fulfill all the requirements. Another question for ubiquitous network is the number of ip address. Do we have enough ip for connecting all our in-house devices to the internet? Ipv6 has been out for years, but it is still not very common in many areas. This is another thing we need to wait. The Last problem we have is the security problem. As we are going to put more and more thing on the web, how can we secure them? Nowadays, most website like gmail, facebook and yahoo require only one login username and password to access all the information we have on the internet. However, it will be a lot different when we put all of our data or connect all electronic devices on the internet. We may require a more secure way to identify the user. An electronic certificate can be used to do that. However, we may need an organization to generate and control all electronic certificates. This will be a long way to go.

To sum up, web3.0 will have 3 features including cloud computing, WebOS and ubiquitous nature. However, many things are required for implementing it such as a fast, stable and ubiquitous network, ipv6 and a more secure login method. All those requirements may need time to fulfill and web 3.0 will surely bring a completely different daily life to us.

Reference: