Blogging Task 9: Research the main features of Google Apps Engine. Summarise these features in a blog post and comment on the main differences between Ruby of Rails web application development compared to Google Apps Engine. Indicate which approach you favour personally.

Posted in Uncategorized on November 18, 2009 by ykj2569

Blogging Task 9: Research the main features of Google Apps Engine. Summarise these features in a blog post and comment on the main differences between Ruby of Rails web application development compared to Google Apps Engine. Indicate which approach you favour personally.

What is Google Apps Engine?

- Google App Engine lets developer run developer’s web applications on Google’s infrastructure. App engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it’s ready to serve users.

- Google App Engine supports apps written in several programming languages. With App Engine’s Java runtime environment, developer can build app using standard Java technologies, including the JVM, Java servlets, and the Java programming language- or any other language using a JVM-based interpreter or compiler, such as JavaScript or Ruby. App Engine also features a dedicated Python runtime envirnoment, which includes a fast Python interpreter and the Python standard library. The Java and Python runtime envirnoments are built to ensure that your application runs quickly, securely, and without interference from other apps on the system.

- With App Engine, we can only pay for what we use.

Goggle Applicatoin Envirnoment

- Google App Engine makes it easy to build an application that runs reliably, even under heavy load and with large amounts of data. App Engine includes the following features:

 >Dynamic web serving, with full support for common web technologies

 >Persistent storage with queries, sorting and transactions

 >Automatic scaling and load balancing

 >APIs for authenticating users and sending email using Google-Accounts

 >A fully featured local development environment that simulates Google App Engine on your computer

 >Task queues for performing work outside of the scope of a web request

 >Scheduled tasks for triggering events at specified times and regular intervals

- The Sandbox

- The Java Runtime Environment

- The Python Runtime Environment

- The Datasotre

- Google Accounts

- App Engine Services

- URL Fetch

- Mail

- Memcache

- Image Manipulation

- Scheduled Tasks and Task Queues

You can see more information in this website http://code.google.com/appengine/docs/whatisgoogleappengine.html.

Main Differences between Ruby on Rails

- Ruby on rails’ main purposes pursue convinience and high productive. Ruby on rails use MVC architecture as main architecture.

- Googgle Apps application can easily write codes for web server and data server.

- Google Apps aplication is closely connected with other google services.

Actually it is really hard to define which one is better application because both of applications have lots of its own advantages.

reference: http://code.google.com/appengine/docs/whatisgoogleappengine.html

Blogging Task 8: Summarise the main features of the Ruby on Rails technology for building web applications. In particular comment on the use of the MVC architecture, ActiveRecord and the stringent naming convention.

Posted in Uncategorized on November 13, 2009 by ykj2569

Blogging Task 8: Summarise the main features of the Ruby on Rails technology for building web applications. In particular comment on the use of the MVC architecture, ActiveRecord and the stringent naming convention.

What is the Ruby on Rails technology?

- Ruby on Rails, often shortened to Rails or ROR, is an open source web aplication framwork for the Ruby programming language. It is intended to be used with an Agile development methodology that is used by web developers for rapid development.

Who is already on Rails and behind it?

- Tens of thousands of Rails applications are already live. People are using Rails in the tiniest part-time operations to the biggest companies.  And Rails was created in 2003 by David Heinemeier Hansson and has since been extended by the Rails core team, more than 1,400 contributors, and supported by a vibrant ecosystem.

What is MVC architectur and how does it relate with Ruby on rail?

-  The Main aim of the MVC architectre is to separate the business logic and application data from the presentation data to the user. The reasons that why we should use the MVC design pattern are resuable and expressive.

-How does it relate with Ruby on rails? The pieces of the Model-View-Controller(MVC) architecture in Ruby on Rails are as follows:

- Ruby on Rails- Model. In object-oriented, database-driven MVC web applicatoins, Model consists of the classes representing RDBMS tables. In Ruby On Rails, Model classes are handled through the Active Record. Usually, all the programmer needs to do is to subclass the ActiveRecord::Base class, and the program will automatically figure out which RDBMS table to use and what columns the table has.

What is ActiveRecord and how does it relate with Ruby on rail?

- the active record pattern is a design pattern found in software that stores its data in relational databases. It was named by Martin Fowler in his book Patterns of Enterprise applicatoin acritecture. The interface to such an object would include functions such as insert, update, and delete, plus properties that correspond more-or-less directly to the columns in the underlying database table.

- Active record is an approach to accessing data in a database. A database table or view is wrapped into a class; thus an object instance is tied to a single row in the table. After creation of an object, a new row is added to the table upon save. Any object loaded gets its information from the databse; when an object is updated, the corresponding row in the table is also updated. The wrapper class implements accessor methods or properties for each column in the table or view.

- A Ruby library is available which implements the object-relational mapping (ORM) design pattern. It creates a persistable domain model from businsess objects and database tables, where logic and data are presented as a unified package. ActiveRecord adds inheritance and associations to the pattern above, solving two substantial limitations of the pattern. A set of macros acts as a domain language for the latter, and the Single Tableinheritance pattern is integrated for the former; thus, ActiveRecord increases the functionality of the active record pattern approach to database interaction. ActiveRecord is the defualt model component of the Model-View-Controller web-application framework Ruby on Rails, and is also a stand-alone ORM package for other Ruby applications. In both forms, it was conceived of by David Heinemeier Hansson, and has been improved upon by a number of contributors.

What is the stringent naming convention and how does it relate with Ruby on rail?

- Naming conventions make programs more understandable by making them easier to read. They can also give information about the function of the identifier for example, whether it’s a constant, package, or class-which can be helpful in understanding the code.

- Naming convention Ruby on rails uses in regard to the models, controllers, source files, classes, table names, relatoinships, methods, routing & the corresponding folder structures. These are created via the ‘ruby script/’ command line generator. You can find more information on http://www.daveporter.info/ror/ror_naming.pdf.

reference:  http://rubyonrails.org/, http://en.wikipedia.org/wiki/Ruby_on_Rails, http://www.roseindia.net/struts/mvc-architecture.shtml, http://www.experiencefestival.com/a/Ruby_on_Rails_-_Rails_MVC_architecture/id/5431730http://en.wikipedia.org/wiki/Active_record_pattern, http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html, http://www.daveporter.info/ror/ror_naming.pdf.

JSON validator.

Posted in Uncategorized on November 7, 2009 by ykj2569

The JSON Formatter was created to help with debugging. As data expressed as JSON is often written without line breaks to save space, it became extremely difficult to actually read it. This tool hopes to solve the problem by formatting the JSON into data that is easily readable by human beings.

Link: http://jsonformatter.curiousconcept.com/

Online resources

Posted in Uncategorized on November 7, 2009 by ykj2569

Following websites provide information that is good for learning web-development and jQuery, and javascript.

jQuery wiki( http://docs.jquery.com/)

jQuery API(http://remysharp.com/jquery-api/): This website provides lots of informatoin of API.

jQuery API browser(http://jquery.bassistance.de/api-browser-1.2/): this website provides some jquery api browsers.

Visual jquery(httpL//www.visualjquery.com/)

Mozila development centre(http://developer.mozilla.org/en/docs/javascript/): provides lots of tools and javascript references.

dev opera(http://dev.opera.com/articles/) provides javascript articles which is for opera browser

MSDN JScript references(http://msdn.microsoft.com/en-us/library/x85xxsf4(VS.71).aspx)

javascript tool box(http://www.javascripttoolbox.com): Matt Kruse’s javascript toolbox provides many javascript libraries that he made and some instances and valuation of other javscript libraries.

YUI compressor (http://developer.yahoo.com/yui/compressor/) : This is Yahoo’s javascript compressor and it is free ware. Also this compressor have good performance.

How to use jQuery with other javaScript Library?

Posted in Uncategorized on November 7, 2009 by ykj2569

When we make a web page,  sometimes we have to use 2 or more javascript library. Lots of library use $ as a identifier, so a way that prevent clashes is needed.

There is .noConflict() method which delegate identifier’s authority to other javascript library. For example,

<script src=”prototype.js” type=”text/javascript”></script?

<script src=”jquery.js” type=”text/javascript”></script>

<script type=”text/javascript”>

 jQuery.noConflict();

</script>

<script src=”myscript.js” type=”text/javascript”></script>

reference: Learning jQuery 1.3 Jonathan Chaffer, Karl Swedberg.

Blogging Task 8: Reflect on the range of online resources you have consulted for developing a solution to Assignment 1. Write a blog post describing the top four most useful sites and provide the link

Posted in Uncategorized on November 7, 2009 by ykj2569

I used HTML, XML, CSS, JavaScript(jQuery and other library) for developing a solution to Assignment1.

Following web sites provide information of HTML, XML, CSS, JavaScript.

1. http://jquery.com/: This web site provides basic informatoin of how to install, use, and how to utilize jQuery to develope web-application.

http://docs.jquery.com/Tutorials <– Here is lots of information.
2. http://www.w3schools.com/: This website provides very useful guidelines for HTMl, XML, CSS, JavaScript, ASP, PHP, SQL and more with lots of examples. Any beginner can easily learn the basic of technologies which is for developing web-site.

3. http://www.webteacher.com/javascript/index.html: This website provides tutorial for Javascript with lots of information and explains really easy way, so non-programmer can understand what a javascript is.

4. http://www.maxdesign.com.au/presentation/page_layouts/: This website provdes lots of sample CSS page layouts which help developing web-site layout design. So we can easily set-up page layout.

Blogging Task 7: research JSON and its strong relationship to JavaScript object literal notation; write a blog post about its strengths and weaknesses, particularly in comparison to XML

Posted in Uncategorized on October 23, 2009 by ykj2569

research JSON and its strong relationship to JavaScript object literal notation; write a blog post about its strengths and weaknesses, particularly in comparison to XML

What is JSON?????

JSON, also called ‘JavaScript Object Notation), is a method that hierarchically represent  information as XML and it also dynamically express data.

- JSON format: There are three main formats that are Object, Array, and Value.

- Strengths of JSON:

 1) JSON is very compact (also JSON is generally smaller than a XML document and there for faster to work with!!): JSON can structurally express information through using some [], {}.  SGML’s language, such as XML, can occur easily because there are lots of letters where are in <tag>..</tag>. So it makes users to be hard to find error and the size of data is bigger.

 2) Use of JSON parser is more simple then use of XML parser.

- Weaknesses of JSON

  1)JSON’s format is very hard to read for humans: It is most important disadvantage of JSON because the format is very hard to read for humans, and that, of course, every single comma, quote, and bracket should be in exactly the correct place. While this is also true of XML, JSON’s welter of complicated-looking syntax, like the }}]} at the end of the data snippet, may frighten the newbies and make for complicated debugging.

Blogging Task 6: read up about the ATOM syndication format and the ATOM Publishing Protocol (APP). Write a post summarising ATOM and APP.

Posted in Uncategorized on October 17, 2009 by ykj2569

What is ATOM syndication format?

ATOM syndication format also called ‘rfc4287′.  Atom is an XML-based  document format that describes lists of related information known as ‘feeds’. 
Feeds are composed of a number of items, known as “entries”, each with an extensible set of attached metadata.  For example, each entry has a title.
The primary use case that Atom addresses is the syndication of Web content such as weblogs and news headlines to Web sites as well as directly to user agents.
Common Atom Constructs are consist of Text constructs(“Type” Attribute), person constructs(“atom:name” , “atom:uri”, “atom:email” element), date constructs.  Element definitoins are consist of container elements and metadata elements.

What is the Atom Publishing Protocol(APP)?

The Atom Publishing Protocol is an application-level protocol for publishing and editing Web resources using HTTP [RFC2616] and XML 1.0 [W3C.REC-xml-20040204].

The atom publishing protocol operates on collections of Web resources. All collections support the same basic interactions, as do the resources within the collections. The patterns of interaction are based on the common HTTP verbs.

- GET is used to retrieve a representation of a resource or perform a read-only query.

- Post is used to create a new, dynamically-named resource.

- PUT is used to update a known resource.

- Delete is used to remove a resource.

reference: http://tools.ietf.org/html/rfc4287#section-1, http://bitworking.org/projects/atom/draft-ietf-atompub-protocol-04.html

Blogging Task5: read up about the TinyMCE in-page editor JavaScript library; write a summary post briefly listing the main features of TinyMCE and show a few lines of JavaScript showing how to convert an HTML tag into an editor page fragment

Posted in Uncategorized on October 10, 2009 by ykj2569

In my view, Tiny Mce example was text form editor and using jquery and CSS and html codes to edit texts and post it.

Jquery file name is loaded from www.google.com/jsapi  and jquery.tinymce.js file.

Blogging Task 4: search for and read the information that describes the new features in release 1.3 of jQuery up to the current 1.3.2 version; write a blog post summarising the main new features of jQuery 1.3

Posted in Uncategorized on October 3, 2009 by ykj2569

Wha is the New Features in release 1.3 of jQuery up to the current 1.3.2 version?

Any Changes?

There is a change that jQuery’s selector engine which re-orders the returned results to be in document order, instead of the order in which the selectors were passed in. This was done in order to be in compliance with the Selectors API specification (which jQuery uses, internally, in browsers that support it).

For example

 // jQuery 1.3.1 (and older)
 $("h1, h2, h3")
 => [ h1, h1, h2, h2, h3, h3 ]
 // jQuery 1.3.2
 $("h1, h2, h3")
 => [ h1, h2, h3, h3, h1, h2 ]

New function and changed features!
jQuery now become possible to call 'event.stopPropagation()' or 'return false' within a .live() callback and have it stop the bubbling of the live event. This means that you can now bind live events inside each other and have the inner handlers prevent the outer handlers from firing.
for example
<ul>
   <li><b>Google</b></li>
   <li><b>Yahoo</b></li>
 </ul>
 <script>
   $("li").live("click", function(){
     $(this).addClass("active");
   });
   $("li b").live("click", function(){
     $(this).addClass("active");
     return false;
   });
 </script>

:visible/:hidden Overhauled

We've changed the logic behind the :visible and :hidden selectors (which were used throughout jQuery to determine the visibility of an element).

This is how the logic has changed:

  • In jQuery 1.3.1 (and older) an element was visible if its CSS "display" was not "none", its CSS "visibility" was not "hidden", and its type (if it was an input) was not "hidden".
  • In jQuery 1.3.2 an element is visible if its browser-reported offsetWidth or offsetHeight is greater than 0.

What does this change mean? It means that if your element's CSS display is "none", or any of its parent/ancestor element's display is "none", or if the element's width is 0 and the element's height is 0 then an element will be reported as hidden.

What is the benefit of making this switch? The result is two-fold:

  • The performance is much, much, better. (See below.)
  • An element is reported as "hidden" if it's inside a "hidden" element (something that wasn't possible before, without the use of a plugin)


Performance graph

.height()/.width() Overhauled

.height(), .width(), .innerheight(), .innerWidth(), .outerHeight(), and .outerWidth() have all been overhauled - dramatically improving their speed in all browsers.


Selector speed up in IE

.appendTo()/etc. Now Return Inserted Elements

This is a (minor) API change - resolving a bug in the jQuery API. The methods appendTo, prependTo, insertBefore, insertAfter, and replaceAll all now return the set of inserted elements, instead of the original set of elements.

To understand this change we need to look at a simple example.

Given the following markup, in jQuery 1.3.1 (and older) the following would occur:

 <div></div>
 <div></div>
 <script>
 $("<p/>")
   .appendTo("div")
   .addClass("test");
 </script>

The result in 1.3.1 (and older):

 <div><p></p></div>
 <div><p></p></div>

This was due to the fact that .appendTo, etc. would only return the elements that were passed in to it, instead of the elements that were actually inserted (and since only a single paragraph was passed in - the first one to be inserted - only the first paragraph had the class added to it).

Thus, if you were to run the same code in jQuery 1.3.2 you would end up with:

 <div><p></p></div>
 <div><p></p></div>

Which is the expected result. The only catch is that appendTo, prependTo, insertBefore, insertAfter, and replaceAll all now push onto the jQuery stack (meaning that they're affected by .end()).

We did a survey of existing uses of the above methods and could find no cases where this change would affect any existing code, so we felt safe going ahead with it (especially considering that it's the expected behavior, to begin with).

reference: http://docs.jquery.com/Release:jQuery_1.3.2

Follow

Get every new post delivered to your Inbox.