Wednesday Mar 26, 2008

I had a chance to go around new york city when i was at the ajaxworld conference last week. Even though it was winter, i really loved the place and the people there. Here are some pictures..




I will be going to Niagara falls this week end (hopefully). So, looking forward to that too! 

Tuesday Mar 25, 2008


Keynote - EffectiveUI - Anthony Franco. - anthonyfranco.wordpress.com
Year of 2008 - RIA


Whats the value of RIA?
Is it useful??

More important.

-Talk to your customers!!

- Demo of websites of target and starbucks which suck!

- Web 2.0 = utility + community + engaging experiences.

- A good example of a usable website - 37signals.com
They do it right because they are the audience of the product
they build which is so unlike other products.

- iphone - may not be simple but it is engaging.
So the key is not being simple but being engaging.
Designers need to buckle up to the trend, listen to the customers.

- AJAX is good.. but not good enough?!

- There needs to be a lot of interaction between designers and developers to make
good products.

- Good usability counts
"Advertising yields 5$ for 1$ invested in return. But 60$ for a good user experience."


Grails - Agile web 2.0 the easy way - jeff brown G2one director.
-----------------------------------------------------


Grails
- full stack mvc framework for web apps for jvm.
- exploits power of groovy.
- Leverages tech. like hibernate, spring, sitemesh.
- You never see hibernate in your app unless you are gonna do complex things.
- Grails takes care of that for you. Same with spring.
- Grails Very useful for data driven web sites.

Demo of creating a very simple grails app.

You can create a war file from the grails environment and deploy it in any
servlet container you want. Jetty is default for development environment.
Working for default deploy on glassfish.

Configuration files are specified in a .groovy files in conf/ directory.
Looks like an alternative to xml files.

Grails - start with a object model and schema is a product of that.
Ruby - Start with a schema and the object model is a product of that.


Some commands:
grails help
Commands for grails using Gant "Groovy ant".

Scaffolding for grails controller class -
Dynamic scaffolding and generated scaffolding.

You can make changes to your classes and reload and see it at runtime. It can be
in your controller class or your UI page (.gsp pages).

In groovy, the last expression evaluated in a block is a return statement.

IDE - IntelliJ has excellent groovy and grails support.

Query support ex: Person.findAllByAgeLessThan(<age>;) or findAllByLastName(<age>;)
etc. Works by introspection. Hibernate works inside all this.



Desktop in browser - Coach Wei - CTO Nexaweb Technologies Inc. & Bob Buttone - chief architect
-----------------------------------------------------------------------------------------------

Right now, a lot of development has with ajax widgets and single page refresh applications.
But the real user experience lies in desktop/offline applications.


Successful apps need "continuous experience".
Its about good user experience and good developer experience.

Nexaweb enterprsise web 2.0 platform utilizes all of existing web2.0 stuff like
ajax (dojo, jquery etc) and java+xml.

Different technologies abstracted with common tooling. So skillsets need not be
honed for each technology.

Moving apps to browser in enterprise is the way to go. You can use the technologies
you like like dojo, flash etc in your app. But having a common IDE which abstracts
the technology you use really helps.


Dreamface - The ultimate web 2.0 framework - Oliver Popuney
-----------------------------------------------------------

Helps you do enterprise web 2.0 applications. Can do mashups.

Fully web based development. No IDE involved.It is open source.
You can add widgets from the internet like youtube widgets, google widgets.
You can make communications between widgets visually.No js code from the developer
needed.

Layouts of the webpage also done visually (seems to be specified via the row, column format)

Visual workflow available on the web browser. You can specify entry points of
screen, create web pages, specify criteria for navigating between web pages, provide
business rules for navigation.

Dedicated APIs available for building your own widgets.
There is a wiki available from the widget which tells how to define your own
data widget templates.

The final web page seems a bit like advanced google home page with a lot more features.


Dojo toolkit - A11Y and I18N
---------------------------------

Why is A11Y necessary?

Visually impared
People with poor visibility
Disabled people

Government compliance, a good market for accessible stuff.


Dojo can claim itself as the first completely accessible toolkit.

One of the problem with accessibility is background images in CSS with high contrast
mode. Dojo has custom utility package which checks for high contrast stuff.
Styles for widgets is changed so that all the widget's css background images are
replaced with suitable text.

Lot of work being done in accessibility side these days. Browsers supporting A11Y stuff
ARIA markup is useful for identifying complex widgets on the page.
WAI roles coming up for better accessibility

Firefox 3 has better accessibility features.

Problem with asynchronous page updates because screen reader cannot identify
updated widgets on the page.
"Live regions" a feature coming up in firefox so that asynchronously updated stuff
can be read out by the screen reader. Three modes-polite, assertive and rude.
Polite reads out updated stuff after content being currently read is over.
Assertive does the same too but a bit more faster.
Rude reads out updated stuff immediately interrupting the currently reading text.


I18N and L10N
-------------

Necessary as a lot of other countries in the world with their specific languages
and semantics have a lot of presence in the web.

Text, dates and even content layout can change depending on localization.

Server side frameworks such as JSP, .NET and PHP have localization inbuilt.

But for web 2.0 we need client side localizations. Dojo provides client side
localization. The bootstrap file loads all the necessary resource files for localization.


Comet and Grizzly
---------------------


Ted Goddard and Jeanfrancois Arcand


Web 2.0 - A web for the people, by the people.
Lots of user generated content, Is the user an HTTP client?
Ajax - state of mind (?!)
Ajax does not exist in W3C universe yet. Standards still catching up.

Ajax still synchronous with user events.
But full decoupling means, sending events or updates from server to teh browser.

Advantage of this: Server mediated collaboration. Server can send messages to necessary clients.

http://webmc.icefaces.org/webmc

What is Ajax Push? highly responsive event driven browser applications. No need to do frequent polling.
Advantage - lower latency, not dependent on frequent polling. Server and network do not have to deal
with frequent polling requests.

example application - 4homemedia.com (uses glassfish's comet)

There is
- Ajax polling req -> resp (event on server) req -> resp(with event)
- Ajax push (Long poll) req - - - - > resp (with event) req ------> resp(with event)
- Ajax push (Streaming) req -----> resp (with event) ------> resp (with event)   something like streaming.

Problem with the third option and proxy. Not ready for streaming contents


Ajax push - HTTP message flow inversion.

There is meta data being sent from the client to the server to help the server identify the request
and the response is sent by the server after some time when the event happens.

Bayeux/Cometd - JSON Pub/Sub mechanism.

JSON messages are published on specified channels. Lots of operations like connect, subscribe, unsubscribe etc.
Multiple transports - polling, long polling, iframe, flash etc.
Server side reflector with no server side application possible. This is sort of similar to irc.

Can push scale????

Blocking, synchronous technology will result in a blocked thread for each connection that is "waiting"
Every block thread will consume memory that can affect performance.

Non blocking - You can have threads that are dynamically allocated to serve clients depending on activity on
that connxn. No need to block a thread for a particular client.

Use a new NIO (new I/O) API for a non-blocking sockets to avoid blocking a thread per connection.

Server-side Ajax push: Server considerations

To handle "wait" for an event in Ajax push, select a server/language that does not block.
Web servers with java can be made non-blocking. So, its not one-connxn per thread, but rather one request per thread.


Its taken a while for me to take time off and write this. But, the good thing is i have done it.

Here is the summary for day1 of the ajaxworld conference that i attended last week. i think i missed out on a couple of sessions here,but
hopefully i can add them in once i can find out where i placed the notes for them.
 

Day 1 at the ajaxworld conference:

The conference started off with Douglas Crockford from Yahoo giving a presentation
on "Can we fix the web".


- The browser was not supposed to do so much Ajax stuff.
- We have exploited most of its potential
- Security is high priority and the browser environment seems highly insecure
- Lots of languages for the web and everything has different semantics
- One thing that is benign in one language maybe harmful for the other.
- The existing model for Javascript DOM and cookies have many flaws in them.
- Forthcoming versions of ECMA script and HTML dont seem to satisfy them.
Some good languages:
Google projects - Caja and Cajita.
Something like JSONRequest for safe data transfer

We could have something like Google gears or Adobe AIR for communication containment.
Provides co operation with mutual suspicion.

But then, it is heavy weight and difficult. Still subect to XSS attacks.

Accelerate web development with Appcelerator

- Started off with history of web related products like powerbuilder and sybase.
- History of WWW, intranets, browsers, W3C, programming languages, netscape,
app servers, JCP etc..
- Web 2.0 seems to be an overloaded term with lots of different things that
are being done being classified as web 2.0
-Appcelerator has a product that does event handling, ajax and DHTML coding for you.
- It codes javascript that you dont have to code.
- We can use widgets from other vendors like YUI, flex and ext widgets.
- Appcelerator provides RIA capabilities along with SOA.


REST and Ajax by Lars Tridoff

- REST is an alternative to soap.
- Each resource has an URI and representation
- Resources have respresentations each of which have URLs.
- There are various forms of REST clients
      - Libwww
      - Apache commons HTTP lib
      - Python HTTP library
      - Web browsers
Web forms 2.0 - Support for other modes than POST and GET

Define representations for resources
Define POST behavior

Browsers do not support PUT or DELETE. So, wrap PUT or DELETE in a post request
and add HTTP method-override header.

Sling with "mu"jax
- Exposes the complete JCR repository as a JSON tree
- APIs for CRUD
- stand along JS library
- DOJO toolkit integration

http://weblogs.goshaky.com/weblog/lars

Jmaki webtop - Arun Gupta

Honestly, one of the better presentations for creating mashups on the web.
I dont think i need to say much about this. You can just go visit http://jmaki.com


Friday Mar 14, 2008

I will be in NY next week attending the Ajaxworld east conference on wednesday and thursday. There are some really good and interesting sessions that i would like to attend in that conference. For example "Seam Remoting - JBoss Seam and Ajax"  and "Using Ajax Data Services in Enterprise applications" seem to be really intersting topics. Sun is a golden sponsor to this event and has Jean Francois Arcand and Arun Gupta giving speeches. Jean has some really good topics i would like to hear on glassfish comet and ajax for revolutionary web applications.The different "tracks" in the conference are:
















Track 01: Enterprise AJAX

Track 02: Rich-Web Tools & Case Studies

Track 03: Web 2.0 & Social Applications

Track 04: Enterprise Web 2.0 Mashups

Track 05: iPhone Developer Summit

Track 06: Diamond Sponsor Track

 I am looking forward to the Enterprise Ajax and Enterprise Web 2.0 Mashups tracks.

And of course, hopefully i will have fun at NY while i am there :-)

Wednesday Mar 12, 2008

Really interesting video.. How money is created. Money as Debt

[Read More]

Wednesday Mar 05, 2008

Came across these two news on the internet today.ei

IBM had earlier acquired SolidDB for its Data Server offerings. But it looks like it is discontinuing the product. Here is the news. The product was apparently mainly used for "in-memory" technology and was built on MySQL. But close on the heels of Sun acquiring MySQL, looks like IBM has decided to quit the product. Maybe Sun's acquisition was one of the reasons for this?!

Also the second larger news is that M$ has open sourced its new RDK (research development kit)  which is apparently a glimpse of the future OS that it is going to come up with..  Its called the "singularity" project and here is its home page.

Here are some of the sites that use woodstock for building their web applications. Mary Lautman, my manager managed to dig up this information from the internet.

 

www.rgtherapy.com

http://www.sipisuominen.com/

http://www.java-architect.com/ - you need to select the GuestBookView

http://www.ourfaces.net/faces/Home.jsp

http://humantree.org/faces/HumanPage.jsp

http://www.bbjsupport.com/

 Any more?

Tuesday Mar 04, 2008

At the end of the first day, my laptop charger conveniently busted and there was some problem with the internet at my friend's place.  But things are back to normal now that i am  back to bangalore.

I had a notion that the crowd in day 2 would be much lesser than day 1.





Well, it was wrong. After a session from Vijay Anand from Oracle, the first presentation i attended was by Jayashri and Animesh on JSF and Ajax and Project Woodstock. It was indeed very pleasant to see people attending the session in large numbers for the project that you are working on. The session was well received by the audience and after the talk the three of us spent quite some time answering queries regarding ajax and JSF in general and also abour woodstock.














I attended a session on JRuby given by Lee Chuk and Roman Strobl. It focused on Ruby programming language and its advantages and how JRuby takes advantage of Ruby + Java.

I again spent the rest of the afternoon interacting with other folks on JSF and ajax. Later in the day i attended a session by SAP on "Role of community networks in platfrom world". The talk was basically about community building for a technology and how it helps in advancement of the technology and for the developers. How the enterprise as well as the community could also benefit from it.

 

Day Three was an add-on day and i had decided to spend my time with the netbeans sessions. This time the key note was from Ian Murdock, Vice President of Developer and Community Marketing. The first of the netbeans sessions began with Roumen talking about Netbeans 6 and its enhancements.




There was a talk by collabnet on SVN, its features and its improvements from the previous release. 

In the afternoon, attended a session on Visual Web Pack again by Jayashree. This time the talk was more focussed on VWP and its features and lesser on JSF and Ajax. There were also some demos on how to use VWP. Some of the other sessions that i attended were on netbeans mobility pack and another session by Roumen on netbeans platform.


Thursday Feb 28, 2008

Finally! I have set foot on hyderbad soil! I was looking forward to three days of fun and excitement at sun tech days 2008 and day 1 definetely did not disappoint me.  There was a lot of energetic crowd from all categories ranging from university students to well established techies and managers present at the meet.

 Morning session:

Commuting using share autos, i arrived at the venue around 8:15 in the morning. There was already a good crowd even at that time. After registering at the registration desk, i took a look around the sponsor stalls trying to make sense of the plethora of software and services being advertised by them.

 

 

The morning session started a bit late with Matt Thomson starting off the proceedings. Rich Green took the key note speech today with a talk on "Platforms that empower web technology". The speech was really enthralling and he gave a short update on each of Sun's products. The topics addressed include Sun's acquisition of MySQL, JavaFX and its future, Glassfish achievements and its future roadmap and of course notes on solaris and virtualization.. There was also a demo by Satish Vaidyanathan from the N1SPS group on xVM. It is noteworthy that the talk was being broadcasted simultaneously to chennai and bangalore!

 


Later there was a mini competition held where there were two teams formed each containing three technical evangelists and each of them had to present on some topic for five minutes each. The winner was chosen from an audience based SMS polling.The topics ranged from using SunSPOTs to a demo on compiz on solaris x86(i am personally waiting for it to work on sparc!)


The first session that i attended was by Arun Gupta who presented on Glassfish. It was an interesting talk where he traced the history of glassfish and the features that were added as time went by, the present state of glassfish, improvements made with each version and  its achievements (such as being the only first fully compliant JavaEE5 app server and the fastest among its breed), the future road map of glassfish V3 and  glassfish's tooling support. There was also a short overivew on Metro (which i suppose will have a more detailed presentation tomorrow also by him) and glassfish's clustering architecture. There was also a short demo on how to use glassfish with netbeans for web services.

The next one i attended was by "Rags" on JavaFX. It was a talk on what JavaFX is and what it is NOT, the advantages of FX (Object oriented, declarative, automatic data binding, extensive colln. of widgets etc.) The general idea was that you could do anything that you could do with JAVA API for GUIs with FX but only easier. There was also code comparison between the two. Then there was a very excellent demo too. Hopefully, once the APIs stabilize, there will be a good market for FX.

Post Lunch sessions:

After a very heavy and excellent lunch, i thought i was going to sleep in the next session. But rather (un)fortunately, there was a very excellent session by Lee Chuk Munn and Roumen Strobl on Rapid web development with Ruby and JRuby. Lee Chuk first gave a introduction on Ruby's history, how it came into existence. Later, he went on to give the scripting language's syntaxes and its usages along with examples. This really helped for dumbers in Ruby like me in getting started with Ruby and helping me realize its power.
Roumen gave a talk on what JRuby is, how it relates to Java,what are its advantages and gave some code examples and demos using netbeans.

 

The next session i attended was by Sridhar Reddy on Java Persistence API. He gave a brief note on what EJB 3 was, its advantages compared with EJB 2.1. Later he started off with a simple example showing a POJO and how it later was converted to a entity bean. Later, he used it with a database table and demonstrated the usage with a session bean. He demonstrated the various usages of entity beans and its advantages in relation with the earlier version of entity beans. He also touched upon the advantages and other improvements made in EJB3 when compared with its previous release. There a lot of interesting questions posed to him during the Q&A session.

After a good tea break, i attended a session on Filthy Rich Clients by Joey Shen. He gave a lot of good advice  on Java GUI programming and how we could increase performance, scalability and at the same time achieve good quality graphics with good useful progamming tips. Unfortunately, i have to admit that i am not much of an know-how in that field. I suppose the session would have really benefited folks who are into this sort of stuff.

My day ended with another incredible session from Arun Gupta. He gave a presentation on JMaki. He explained what JMaki meant(J-Javascript and Maki - combination(?) ) and what benefits one obtained from such a wrapper framework. I was really impressed with this. Some of the advantages include standardized event/data model, consistent programming model among different frameworks and defaults for the components set out of the box. The presentation was very interesting in the sense that it was interlaced with a lot of demos.

For those who thought that the day was over, there was also an enticing performance by the much renowned "Euphoria". I have a high regard for this group, who once in my university (when i was studying) performed non-stop 200 minutes live on a stage jumping, dancing and yelling all late in the night till about 3 in the morning.

 

 Hopefully tomorrow will also be a very fun filled day. And for those who happen to read this blog before day 2, there is a presentation on JSF, Ajax and woodstock in the community track. (It's the first session in the morning!) So, be there!


 

Tuesday Feb 26, 2008

I'll be attending this year's sun tech days happening at hyderabad. Its spread over three days (including a netbeans day which i plan to attend). This should be a great chance to get to know some of the latest ground breaking technologies and also a chance to see hyderabad. Here is the agenda for the tech days. I have my eyes set on the enterprise and the rich clients track for day 1 and community and interop track on day 2

There is also a presentation on "JSF and project woodstock" in the community track on day 2 and also on visual web pack on day 3 (netbeans day).

I'll have to wait and see how my brain digests the information from different sessions along with my stomach taking care of hyderbadi biryani!
 

Thursday Feb 21, 2008

This blog discusses about developing a simple portal application with
woodstock (VWP) and deploy that  in glassfish in netbeans 6.0.

Getting started:

The first step is to install the portlet container driver for
glassfish. You should find them at:

https://portlet-container.dev.java.net/public/Download.html

You should then install it in your glassfish server location.

In *nix systems, the command would be:

java -jar
portlet-container-configurator.jar /usr/local/glassfish 
/usr/local/glassfish/domains/domain1


where:

/usr/local/glassfish - glassfish install location

/usr/local/glassfish/domains/domain - domain that is being used for
glassfish.



Next, download and install the portat plugin pack for netbeans.

You can download them at:

http://portalpack.netbeans.org/download.html



There are four downloadable plugins available out of which if you are
going to deploy the application in glassfish, you wouldnt need to download the fourth plugin meant for sun java
system portal server 7.x

Creating a portal app

Create a new JavaEE5 web project. You should choose the target
container as glassfish (since we are using that for this example and not tomcat). In the final step of project
creation, where you have a list of frameworks to choose from, you should select VWP and Portal support. Select portlet version
as 2.0 and check the "create portlet" and "create JSP" checkboxes.

(Click on the image for a larger view)






The project should now be created. The Visual web designer screen
though shows up as a white blank screen. You should be still able to drag and drop components initially and set
properties on them.

Drag and drop a text field and a button on to the screen. Let us try to show this simple page on a portal server.

Configuring the application

The following changes needed to be made at present to make a portlet
work properly with woodstock components.

i) Download jsf portlet bridge from
https://jsfportletbridge.dev.java.net/ and make sure you include that
in your application library's classpath.

ii) Make sure you have the following six libraries imported to your
application.

(Click on the image for a larger view)





iii) Edit your portlet.xml file so that it contains the following line.

           
<portlet-class>com.sun.faces.portlet.FacesPortlet</portlet-class>               


Once you do this, there should be some error shown on the visual
designer page and you wouldnt be able to  make visual edits on the components. However you should be able to edit
the JSP pages.

iv) Include a <webuijsf:themeLinks> tag in the JSP page so that
the woodstock theme is included for the app.



v) Right click on the jsp page -> set as initial -> view mode.
(or edit/help mode). Alternatively, you can go to portlet.xml and append it as an init-param. Something like:

        <init-param>

<name>com.sun.faces.portlet.INIT_EDIT</name>

<value>/Page1.jsp</value>

        </init-param>  



Deploying your application



i) Start the glassfish server. Check whether the portlet container
driver is installed for glassfish by going to

http://localhost:8080/portletdriver



ii) Build your web application



iii) Go to the admin tab of the portlet page and upload the web
application's war file.





iv) You should now see the text field and button in all its glory!





For more information on portlets and woodstock you can take a look at Dmitry's blog on Running Woodstock JSF Components in Portlet environment

Sunday Feb 10, 2008

Expedia is starting its indian operations at expedia.co.in. This should be very interesting and very useful. I have heard many people say that expedia has been very useful in comparing and booking flight tickets and hotels. Hopefully, expedia's indian website should also be able to offer a comprehensive search suite and hopefully a better one when compared to sites like makemytrip or yatra. Today i also came across a new indian site called flightraja . You can not only book hotels, air tickets or rent cars, but it also helps you book bus tickets from multiple bus service operators. Finally, the online travel market has begun to see some good and quality competition in India. Booking tickets online has never been more easier for Indian travellers and you can finally look forward to saying good bye to long queues at the reservation counter. 

On a related note, hopefully, irctc(online train reservation) will take a note of this, and try to improve the quality of website in a number of areas such as usability of website, faster load times, prevent java exceptions being thrown in the website, time-outs while making payment etc..

I recently installed ubuntu on a desktop pc in office. Since i need to access the internet through a proxy, i needed to make sure that apt-get was configured to access the proxy server. After googling aroung for a bit, i came across the configuration for using a proxy server for apt-get.

1) Edit /etc/apt/apt.conf using a text editor.

sudo vi /etc/apt/apt.conf

2) Enter the following text

 

ACQUIRE {
http::proxy "http://userid:password@proxy-ip:port-number/"
}

 
If you dont use an user id/password to access the internet, simply use http://proxy-ip:port-number

Then save the file and do the following

sudo apt-get update

Now, we should be all set.. Make sure that you have selected the appropriate repositories to install/
upgrade software

Similarly, we would need to configure the proxy for wget too.

1) sudo gedit /etc/wgetrc

2) In the following lines

 

# You can set the default proxies for Wget to use for http and ftp.
# They will override the value in the environment.
#http_proxy = http://hostname:portno/
#ftp_proxy =http://hostname:portno/
# If you do not want to use proxy at all, set this to off.
#use_proxy = on

Uncomment the http_proxy and ftp_proxy lines and put the proxy server hostname and ip address there.
Also, make sure to uncomment the use_proxy line.

3) In your .bashrc file (assuming you are using bash shell) set the http_proxy and ftp_proxy variables

export http_proxy = http://hostname:portno/
export ftp_proxy = http://hostname:portno/

Now you should be all set to install updates or new software! 

 


 


 


 

 

Friday Feb 01, 2008

There is an exciting application on the web, which lets you broadcast yourself live. All you need is a camera and an internet connection. (Alright.. yeah.. i know.. i have seen similar networking sites like this ) But this one is a much more mature and much more professional site. Serious about the content it has.. You can also host recorded clippings and search through videos people have hosted. The site called appropriately ustream. You can tag your streams or recorded clippings which help users decide the content that they want to watch. They can also search for people and connect with them hence again forming a social network. With these kinds of advancements i guess the    "The Truman Show" days are not far away.. The only difference, people are knowingly broadcasting themselves 24 hours a day!
And of course here is sun's channel on ustream.

 

Wednesday Jan 30, 2008

Came across this good article in javalobby. There is a developer from france who has written about why the world has still not embraced the JavaEE5 release which is going to be 2 years old in a few more months. Even though JavaEE5 is way much more better than its previous release J2EE1.4, the factors affecting its adoption are basically the learning curve involved, ignorance to the improvements made and lack of popular j2ee container support to it. Even though glassfish is fully JavaEE compliant and one of the best JavaEE containers to use, people seem to still associate it with older releases and are hesitant to go use it.

Also, people have the thought that EJB3 is still the old EJB. Lots of empty methods, home and remote interfaces, tons of xml configuration etc.. Despite a lot more improvements made in EJB3 which have made it much less confusing and easier to use, people are still not investing in it.

The move to JavaEE5 also requires the adoption of jdk1.5 from 1.4 which companies are not investing in again. (somehow that sounds stupid to me.. But i dont work in those companies)
 

http://java.dzone.com/articles/why-are-we-not-using-java-ee-5 

This blog copyright 2009 by venky