Showing posts with label web programming. Show all posts
Showing posts with label web programming. Show all posts

Wednesday, July 18, 2007

Adoble Flex - introduction notes

      In my first post I've spoken about some of the differences between Html and Flash. I am going to spend some time presenting to those of you who have not heard about the Flex product, some of the capabilities of the Flex 2.
      The Flex products line provides with the next generation of Developers Tool to build and deploy RIAs (Rich Internet Applications)on the Flash platform. Flex is an umbrella term for all the technologies of the Flex Product line that help developers to be extremely productive in RI Applications development. Flex allows you to create expressive content with effective interfaces, and deploy applications threw a well distributed, high performance cross-platform, cross-browsers run time environment.
      The Flex product line contains:
      *Adobe Flex Builder 2
      *Adobe Flex SDK
      *Adobe Flex Data Services 2
      *Adobe Flex Charting 2
      Adobe Flex Builder 2 is a completely new integrated development environment also known as an IDE for the Flex Framework 2, which provides coding, debugging and design tools and takes advantage of the industry leading Eclipse Tool Framework. Flex Builder 2 can install as a Standalone product, or add functionality to an existing Eclipse 3.1 installation.


It can also be used alone to develop and deploy Flex applications or can be used in conjunction with Flex Data Services. Flex Builder has a built-in compiler to create swf files from MXML and Action Script code.
      The Adobe Flex SDK provides a skeleton of the application that developers can use to extend the Flex framework which consists of prebuilt components, and these prebuilt components can be extended, or developers can build their own components from scratch.

      A highly comprehensive component framework is included within the SDK to help facilitate this. There is also a rich class library based on Action Script 3 that embodies best practices for building RIAs. The Flex SDK also contains and XML based language called MXML that provides a great way to build and layout applications as well as an the scripting language called Action Scipt 3. A compiler is also included in the Flex SDK creating swf files from your MXML and Action Script 3.

      In order to start a Flex application, the web browser will request a swf file, which is then downloaded to the client. The developers able to compile a swf file by laying out their application in the MXML language and using Action Script 3 for any logic. Action Script 3 is a class-based language that is as close to Java as you can get without actually being Java. Once the compiled swf is downloaded to the client, the swf itself can then request additional resources from the server using either Http, Soap or an Adoble protocol known as The Action Messaging Format(AMF).
      The Adobe Flex Data Services 2 add enterprise messaging support and greatly enhanced data services architecture the Flex SDK. Data services also gives you the ability to share data among multiple clients and offer support for client to client data communication. You can also push data out of the Flex Client using Data Services which gives you the ability to create sophisticated applications that displays real-time data such as sports or stock data. Flex messaging allows whole new categories of applications like data push and collaborations based applications to be delivered to the browsers in a reliable and scalable way.
      The foundation of the Rich Internet Application is the Flash Player or the Flash Virtual Machine. Flash Player 9 has been for Flex and is the backbone of the Flash platform. Of course Flash player 9 is fully backwards compatible with all of the other versions of Flash player as well. Flash Player 9 supports Action Script 3 which is a completed object pointed scripting programming language. It is a new optimized Action Script Virtual machine(AVM2) uset to execute the new Action Script new code which is significantly faster than the earlier versions. It has full run time error reporting, unlike earlier versions that were failing. There is industry standard debugging that contain stronger compile-time checking and mini new elements have been added including E4X which treats XML as a native data type, regular expressions and a brand new event model based on W3CDom events standard.
      My conclusion is that if you consider moving on and leaving HTML behind, it worth's a lot looking at this program, especially if you want to develop a rich Internet application like an e-commerce website or a website that highly interacts with the users. It has great features included and i will detail some of them on my next posts. If you also like to you can visit the Adobe website for more details.


Open full post here

Thursday, July 12, 2007

Flash or HTML: Which to Choose

      I am going to start with a short comparison between programming in HTML and Flash. I am sure that every websites developer asked himself at least once what would be best to choose in order to develop one certain website or more. Even in the early stages of learning websites programming, anyone can tell that there is a huge visual difference between those two. While HTML websites are static(excluding some javascripts commands to have a certain object move), Flash websites are all into animations, dynamic contents and a lot of interactivity with the users. The method that is chosen depends purely on the type of website being created and the goals of the website owner.
      Since every web browser in the world is designed to interpret HTML code and display web pages, building a site using strictly HTML ensures every web surfer will be able to view the site. Flash, on the other hand, requires users to have the Flash Player, which is a browser plug-in, installed on their computer in order to properly display the website. In addition, as Flash matures there are different versions of the Flash Player out there, further diminishing the chances that every visitor will be able to view the website.
      On the other hand, Flash offers some capabilities that simply cannot be matched using pure HTML code, such as animation, dynamic content generation and user interactivity. Much of this capability stems from the Actionscript, which is the scripting language used in the Flash environment. Actionscript allows for developers to create complex animations, incorporate streaming video and provide unparalleled interactivity. In recent years, Flash has also proven to be a leading method for providing streaming video content on the web, and continues to be the choice for developers who want to present complex and stunning visual presentation.
      Search-engine optimization is an important consideration if the website will rely on search engines to generate traffic. When looking at how a search engine will index a website, HTML offers the best choice. The reason is that search-engine spiders are designed to interpret and understand HTML code. In recent years, some search engines have made progress at indexing Flash content as well, although that can be deceiving for a couple of reasons. The first reason is that search engine spiders do not have the ability to run Actionscript code, which means that any dynamic content or Actionscript generated links, will not be indexed. The second reason relates to the way that search engines index and rank content.
Generally they would prefer to see content packaged in discrete, relevant units like the pages in an HTML website are. With a Flash site, all of the content appears to be in one file, causing content dilution in the search engines.
      As a personal opinion, i stoped using strictly HTML for creating a website. I am a fan of "good looking" and highly interactive sites, so when i have a chance to develop a website, i am more into programming with actionscript. There is a way that you can have both of them on the website, so this way your site will look more dynamic and also take advantage of the search-engine spiders (meaning you can still make full use of the html tags). The solution comes by implementing flash contents into your HTML website which can be done very easy. Here is an example of the source code that will have to be implemented in your HTML files.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="778" height="653">
<param name="movie" value="path_to_the_swf_file(your flash content)" />
<param name="quality" value="high" />
<embed src="path_to_the_swf_file(your flash content)" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="778" height="653"></embed>
</object>


      There is a certain matter that i would like to tell you about. I have been facing a dilema when trying to create an e-commerce website. Most of the e-commerce websited out there are still made using a combination of html, php running on an apache server and connected to a mysql database. This is the most common way to create a e-commerce website and there is plenty of informations on the internet on how to create one. I will not cover this on this post. If you are wondering how can you have a full flash e-commerce website, well, things are starting to get a little more complicated. You would still have to use a database connection with the website and you will still have to run it on a server. If you guys look on the www.adobe.com website you will find most of the informations you need on how to create such a website. The answer is Macromedia Coldfusion which is great to have your flash website connected to a mysql database. Take in consideration, that i am talking exclusively about developing a website on html or flash language. There are other programs you can use that rely on different methods to create a website, but i come back on this subject on a future post. If you take a look at www.ebay.com in camparison to a site like www.niketown.com, you will see an obvious difference. While Ebay is dull and static like we are all used to see, Niketown comes with a great visual advantage. But that compensates on the loading time of the website. Html will ALWAYS load faster on any user's machine. Flash will take more time to load, but it will have more class only because the dynamic contents.

      Here are 2 trick to have something that "moves" on your website without using flash at all
-

1.HTML Code For Scrolling Marquee


The HTML for scrolling text uses the marquee Tag as in the examples below.


Source
<marquee bgcolor="" width="100%" direction="left" loop="infinite" scrollamount="1">Scrolling Text</marquee>
Output
Scrolling Text
Source
<marquee bgcolor="#eeeeee" width="100%" direction="right" loop="infinite" scrollamount="2"><strong><font color="red">More Scrolling Text</font></strong></marquee>
Output
More Scrolling Text
Source
<marquee bgcolor="" width="100%" direction="left" loop="infinite" scrollamount="1">Scrolling <a href="8.shtml">Hyperlink</a></marquee>
Output
Scrolling Hyperlink



2.Gifs insertion


- using gifs (animated pictures) here is a link that will help you on this: http://www.3dtextmaker.com/image_editor.html. Feel free to check out the link. You should be able to include your gifs on many hosts.


Open full post here