Monday, 24 November 2008

Eclipse DemoCamp Materials Available...



Today we had some complaints about the presentation material not being online yet. So I decided to stay late and commit everything to our CVS server. First please keep in mind that this server is just a regular desktop conected to a regular ADSL line so dont expect 100% uptime. 

Connection Details:
Connection type: pserver
User : eclipsist
Password: eclipsist
Host: yenerm.homeip.net
Repository path: \sys\okyanus
The Java project is named WorkshopJava and the flex projects is named WorkshopFlex. You can find the presentation in docs folder under Java project. The previous Eclipsist projects which may be easier to understand are also still available under same repository.
Please let us know if there are any defects or not clear points.


Sunday, 23 November 2008

Welcome to RIA age...

Today is my day off and as we promised in our Eclipse Democamp presentation, I am going to post our presentation and demo camp code materials but first I wanted to post some thoughts...

2.5 years ago when I was first introduced to flex2 beta i was not very sure if it can really get popular. As I start messing with flex I find it very exciting and promising, thats how my friend Yunus and I started pushing flex into our projects. For a long time flex didnt spread as I expected but lately I see so many projects moving into flex and people are more interested. During our presentation (and after) we were so happy to see people so interested and asking questions and sharing their opinions and experience.
Ladies and gentlemen welcome to RIA age...

Friday, 5 September 2008

Google Chrome

Ok another post about chrome, actually I have been stopping myself from writing for two days but I am even so happy with the "beta" product so I must type fes lines.
First of all this not a full new browser, it does not have it is own brand new rendering engine. Instead it is just using the webkit which is also the heart of Safari browser. Some people may complain about Safari's compability but it is not, the webkit engine works great as long as u have a standart and properly coded site. So instead of complaining do neater coding or hire better coders. 
Chrome is fast, the moment i click the icon it is just ready to browse. Explorer 6 was very unstable and not memory firendly under XP, better but still much memory consuming  under vista. Firefox specially version 3 was nicer but takes so long for the initial start. Chrome is very light, fast and has a very small footprint. Boots fast and handles every tab as a new instance in the memory. Actually most people may not notice how important this is but browsers limit the parallel http requests which may cause ajax or flex developers pain. By having different insances at least every instance will have its own connection pool. Each tab has its own url box which is also great. The browser does not take much space on top so all the screen is yours to surf. Actually since widescreens become so popular i really find the number of lines very little, so i really think it is nice. You can just drag a tab and drop it on your desktop which will become a seperate window or if you mistakely opened a new window instead of a tab just do the opposite.
Chrome asks for the latest java runtime update which can be the survivor of the JavaFX and applets. It does not seem to have problems with Flash runtime. 
Actually Chrome is still beta but i had no problems while surfing. I think this is the main difference between the visions of Microsoft and Google. Microsoft can release Silverlight, a competitor to Flash/Flex without forming a component library even without a button and expecting developers to make html/js hacks to decorate the silverlight applications with buttons and label it as version 1.1, where Google even labels very near complete products like Chrome as "beta". Well done Google!

Friday, 18 July 2008

Aspect Oriented Programming; A diffrent aspect.

Yesterday I was having a meeting about a new project startup. At some level the meeting was stuck at on argument of logging. Well I suggested the same thing as any over than mid level developer would suggest... "why don't we use the aspects?".Our project is running on Websphere Application Server and using JDK 1.4 which means we won't be using EJB3 or annotations. So I just tried AspectJ, well although the examples i found were confusing what I achieved was very simple and easy.
Here is a basic tutorial on how to enabling and using aspects...

Lets say we have a web application running on any server consisting of several servlets and we want to know the count of servlet calls and we also want to log the parameters received. If we are in the beginning of the project we can just copy several lines of codes to all doGet or doPost methods. Seems easy but what if the project is at the end we need to add that feature and what if the needed parameters subject to change. In this case everytime we need to visit every single doGet method and change everything again.

Aspects are interceptors, you may just imagine registering an invisible listener to the methods you want to watch and aspects just do whatever you need. What makes them great for logging is you just register (or give a naming pattern) of the methods and aspects will watch execution or exiting of your methods. So lets code..

This our test servlet just imagine we have hundreds of those with different parameters and codes.


import java.io.IOException;
import javax.servlet.Servlet;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class AspectTest extends HttpServlet implements Servlet {

public AspectTest() {
super();
}

public void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException {
System.out.println("*******************servlet running");
}
}

Now lets enable AspectJ, I assume you are using eclipse and already installed AspectJ plugin if not just use eclipse update site.

Right click your project and click to Convert to AspectJ Project. Now we added AspectJ support. Next click select new > aspect. We can code our aspect now.

public aspect AutoLog {
pointcut loggableCalls() : execution(public * *.doGet(..));

before() : loggableCalls(){
System.out.println("***getting in "
+ thisJoinPoint.getSignature().toString());

}

after() : loggableCalls(){
System.out.println("***getting out "
+ thisJoinPoint.getSignature().toString());
}
}

So simple, the pointcut just captures all doGet methods of all classes in all packages and the before and after methods just print the class and method name. We can now deploy our project on server and test our servlet.

[7/18/08 10:18:59:162 EEST] 0000005f SystemOut O ***getting in void AspectTest.doGet(HttpServletRequest, HttpServletResponse)
[7/18/08 10:18:59:162 EEST] 0000005f SystemOut O *******************servlet running
[7/18/08 10:18:59:162 EEST] 0000005f SystemOut O ***getting out void AspectTest.doGet(HttpServletRequest, HttpServletResponse)

Now lets go more advanced we want to log all parameters going into our servlet. We only need to change our before block.

before() : loggableCalls(){
System.out.println("***getting in "
+ thisJoinPoint.getSignature().toString());

Object[] obj = thisJoinPoint.getArgs();
HttpServletRequest request=(HttpServletRequest)obj[0];
Enumeration enumeration=request.getParameterNames();
while (enumeration.hasMoreElements()){
String param=enumeration.nextElement().toString();
System.out.println(param+": "+request.getParameter(param));
}
}

After we publish, lets run the servlet with some parameters...
https://localhost:9444/AspectWEB/AspectTest?a=aa&b=bb&c=mneokjnfvjr&d=nnnnnıerhvnj

..and the output is..

[7/18/08 10:18:59:162 EEST] 0000005f SystemOut O ***getting in void AspectTest.doGet(HttpServletRequest, HttpServletResponse)
[7/18/08 10:18:59:162 EEST] 0000005f SystemOut O b: bb
[7/18/08 10:18:59:162 EEST] 0000005f SystemOut O a: aa
[7/18/08 10:18:59:162 EEST] 0000005f SystemOut O d: nnnnnierhvnj
[7/18/08 10:18:59:162 EEST] 0000005f SystemOut O c: mneokjnfvjr
[7/18/08 10:18:59:162 EEST] 0000005f SystemOut O *******************servlet running
[7/18/08 10:18:59:162 EEST] 0000005f SystemOut O ***getting out void AspectTest.doGet(HttpServletRequest, HttpServletResponse)


Very simple and very efficient, don't worry about future requests of your boss or customer. All you need to change is either before or after block. If this is not agile can please someone tell me what is...

Tuesday, 15 July 2008

IBM, Rational and EJB3

This week I am attending a course at IBM. First of all I did not enroll for this class since the subject is something i already know but my company has some free seats and requested me to join. The course is Developing EJBs with Rational Developer 7. I have used RAD6 but mostly WID6 so what I thought was RAD7 must be a new version which is capable of JavaEE5 since Websphere Application Server 7 includes EJB3 support and since even there is a EJB3 pack for WAS6. Few minutes after the course started I find out I am wrong. The lecturer said RAD7 doesn't have EJB3 support but IBM is preparing version 7.5 with EJB3 support. Actually after I google some i find out the ide doesnt complain when you develop EJB3 but also it doesn't help. Actually I find it weird to have EJB support on the underlying server but not on the tool since both are from the same vendor. Beside IBM still teaching EJB 2.1 where EJB3 has been on market for years and EJB3.1 will be out soon.
Well, don't rush IBM.. please don't..

Friday, 20 June 2008

Simple, embedded, OO Database

No I am not talking about Derby or any other sql DB. I am talking about a real Object oriented DB which makes it easier to implement Domain Driven Development.

DB4O is a open source object database for both Java and .net. DB4O stores data in flat files which is not much different than serilization but the strenth lies within the easy of use. DB4O is very easy to set up and use. Even the test drive tutorial is quite enough for learning how to use. So sad that there is no support for JPA. I think if db4o can offer JPA support it will be a great choise for development phases.

I tested db4o for storing and reading mass amount of data and the results were good. Files sizes don't grow fast and the system can handle object relations well. I also prepared an abstract class which can takeover the persistance job from the domain objects and hides away that complexity. I would really love to try and see what can db4o offer in a real project and production environment.

Countdown to Ganymede

Days of Europa is numbered now, soon we will all be upgrading to Ganymede and looking for new versions of plugins.
Latest version of eclipse, named Ganymede (the largest moon of Jupiter and also the solar system) will be available on 25th of June.
During our presentation on eclipsist in late april, we had chance to review release candidate of Ganymede and had been informed about the new features which were very interesting although this is not a major release.

Welcome Ganymede, and goodbye Europa, you have been so helpful and last year i didn't spend a day without you...

Monday, 9 June 2008

This time last year...

Well as a recent member of 30s club I decided to compare few things with last year. This time last year I was just starting a new project and a new colleague was insisting on using wicket. We have just finished the JSF projects so everybody in the team was quite familiar with that technology. I was personally very interested in Flex which was version 2 by that time.
That time Wicket has just been moved to Apache and in incubating period.
By that time last year my impressions about JSF, Wicket and Flex were;

2007
JSF is outdated, we must leave it behind and evolve. Ajax and Javascript sucks. I am very keen on trying any technology which will replace Javascript. Meanwhile Netbeans offering nice tools for JSF but i can't even imagine replacing Eclipse. GWT can be a nice alternative.
Wicket is nice, you code and debug in native java platform. The Java and Html code is totaly seperated but still not easy to make a designer and developer work seperately. The learning curve is not so easy eventough it is just plain java code. Although wicket has embedded Javascript features, you still need to code javascript which caused our project not to run on firefox in just the begining of the development. Since wicket is under apache now i think their future is bright.
Flex is fantastic but for a year I have been waiting them to make a leap which they couldn't. I am so afraid that developers are so afraid to leave html behind and work in the flash runtime. News about Flex 3 is everywhere. I believe learning curve is very easy and since Flex builder is just a plugin for Eclipse, it feels so comfortable to code.

2008
JSF is still popular Developers are so experienced about JSF. Sun is making a god progress and version 2 early access is available. My toughts about JSF is changed a lot. I believe it is still a good choice since people are so experienced and JSF and its tools become so mature. New vesion of Netbeansagain offering nice features but still i can't imagine to migrate to Netbeans from Eclipse. We are all waiting for weblets. Several application servers are now JavaEE 5 compatible which indirectly makes JSF stronger. Well my new project will be on JSF, I will miss Flex a lot but corporations still prefer JSF.
Wicket is a disappoinment. One year passed and i don't see any progress, I haven't seen any big projects developed over Wicket and people are concerned about future of wicket. My ex-collagues (all are flex developers) who are joining to my old project doesn't want to lern and use wicket. After flex developers don't find wicket fun, the output is plain, javascript is still on the stage and JSF is much mature and developers are more experinced on it.
Flex is version 3 for over 4 months which was not a major release but still very fun to use. Licence prices of the builder dropped. BlazeDS which is a subset of LiveServices is now open sourced. We had completed 2 successful projects with Flex and the one which is (70% wicket, rest flex) still struggling. The team is quite experinced with Flex now and Flex at last made the leap i was expecting long ago. Version 4 news hits on blogs and the new features are amazing. Everything is really on the way on flex side.

Well when I look back I see my views changed so dramatically so I am not sure what will this year bring. Last month we had a presentation and workshop on Flex with Java backend in which everything went so smooth and we could finish a project from strach. Well next week I will be in caves of JSF again so now I am watching the news of JSF 2.0 with more caution.

As i said before by today now I am officially a member of 30s club, am i considered to be a wise and aged programmer? :)

Sunday, 8 June 2008

Design Patterns Revisited (3)- The Façade Pattern, Hiding the complexity of the complex..

It is arguable that the Façade pattern is a design pattern or not but it is sure that it is a nice tool method for software developers. The definition of Façade pattern according to mighty GOF is 
Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.
Seems easy isn't it, well façade is act as a gateway for a series of complex procedures you need to do. All you have to do is delegate everything to your façade and use it as a gateway. You need to call a specific method in the complex system, well they are still available, just call them whenever you need. 

One of the most challenging thing people face when they move to away from their families is to do the washing up. Even you own a washing machine, there are many options, procedures and steps you need to complete. So what if we just design a new washing machine with preset programs like for "very dirty clothes; use double amount detergent, get water twice, wash for longer time then dry..etc" or for "very light dirt; use half amount detergent, get water once, wash for shorter, no need to dry..." or just a normal program like "get the detergent, get the water, wash, dry..". None of the steps above makes sense for me and i really don't care what does the machine is doing as long as the output is clean clothes.  So lets just code a class which will be the façade of our washing machine and will only use the methods which were already provided with the washing machine.

    public class Clothes{
         private int amount;
         private String owner;
         private String status;
         ...
    }
    public class WashingPresets {
        private WashingMachine washingMachine=new WashingMachine;
        public Clothes lightWash(Clothes clothes) {
             washingMachine.getWater(50);
             washingMachine.getDetergent(20);
             washingMachine.wash(clothes);
             return clothes;
        }
        public Clothes heavyWash (Clothes clothes){
             washingMachine.getWater(100);
             washingMachine.getDetergent(35);
             washingMachine.wash(clothes);
             washingMachine.getWater(100);
             washingMachine.getDetergent(40);
             washingMachine.wash(clothes);
             washingMachine.dry(clothes);
             return clothes;             
        }
        public Clothes normalWash(Clothes clothes) {
             washingMachine.getWater(100);
             washingMachine.getDetergent(40);
             washingMachine.wash(clothes);
             washingMachine.dry(clothes);
             return clothes;
        }
    }
 
    public class Client{
         // anyone who wants to use our washing machine can just use such a simple code piece
         public void washMyClothes(){
               Clothes clothes=new Clothes();
               WashingPresets ws=new WashingPresets();
               ws.heavyWash(clothes);
         }
    }

We have just used the special methods provided by our tech-end washing machine and hide the complexity in our façade class. So from now on our house mates just need to select the program which suites their laundry. So nice, so easy and so fast but what if one of our house mate is very ungenerous on spending money and doesn't want to use our heavy washing program because it uses to much detergent. Actually all he wants is to rinse the clothes ones more without detergent and with less water and since he is the only want making the trouble we don't want to add this style as a method in our class. So we let him use our façade along with the methods provided by the producer;

    public class TroublesomeClient{
         public void washMyClothes(){
               Clothes clothes=new Clothes();
               WashingPresets ws=new WashingPresets();
               WashingMachine washingMachine=new WashingMachine;
               ws.lightWash(clothes); //façade call
               washingMachine.getWater(50); //native methods call
               washingMachine.wash(clothes); //native methods call
         }
    }

Well we didn't do too much but with this design we can hide the complexity and all clients including the ungenerous one is quite happy since everyone has much less thing to do and it is hard to miss a step and ruin the laundry. 
As mentioned in Head First Design Patterns just try to obey the principle of least knowledge;
Talk only to your immediate friends!
Always hide the complexity from the code which doesn't need to know the details.

Friday, 23 May 2008

New Baby on Board : GraniteDS

I have just come cross a remoting alternative to BlazeDS which is called GraniteDS. Even thought it uses the same core classes it is much more simple and Google is behind that project.
Just as they say now it is so hard to determine if the future of Flex Data Services will be in GraniteDS of BlazeDS. I tried it and it works fine.
I am so happy to see that Google is supporting a commercial product like Flex. It is extremely easy to integrate this open source solution with spring framework. And it is nice to develop POJOs to communicate with remote interfaces. I suggest everyone to try this one, and Google guys... Well done and I hope you can also add data synchronization soon..

Thursday, 22 May 2008

Antipatterns; Building unextensible software

For some time I have been writing some posts about design patterns. To show why they are important and how they help let me also introduce you The Anti-Patterns.

Recently a friend asked help for some professional advice for their company's running software, so i went as a consultant and examine their software and needs. First let me give you some brief imformation (without mentioning the companys name). They are a small-mid size company in health business, who have very basic network and computer setup. The have a professional financial software which works fine, but what they fail is their custom built software. They started coding the project 2-3 years ago. Since they didn't have an IT team (and they still don't have a real one) they asked a software company to guide them and hired some professionals(?). The developer on their side has changed up to 4 times and the software company who guides them had only one developer who know about their project and he already left the company. So now nobody can help about the new software needs and bugs.

When I first entered the server room instead of checking the interfaces, I wanted to see the database (as a Domain Driven developer). They had 160 tables coupled with 140 stored procedures and about 20 views. Heavy use of stored procedures caused the business buried into database but the software also still has some of the business logic which make the business flow divided into two (Layered architecture failed). When they showed me the functionality of the interfaces I was so suprised that I have seen so many tables for so simple functionality (over complicated db structure). Meanwhile when I checked the tables i saw that they are not normalised and some have more than 30-40 columns (db normalisation failed). I wanted to check the classes but the first thing i figure out was some classes has over 15000 lines of code (keep your classes short). Then they mentioned about their reporting needs. They have some reports which can not be sorted, new parameters or columns can not be added. I was so suprised when the marketing department said we cant get the patients ordered by city so we just count them one by one over the report. That report which their IT stuff cannot get ordered, is a report querying just one table and the city information does not rely on any other table, it is just an embedded column in that table. Come on even a fresh graduates would order by that query in few minutes.
Their software has all major anti-design patterns including spaghetti, dead end, golden hammer, lava flow, the blob... and just like most IT projects the software does not have any documentation, and the back office part is not completed (ex. they can't add new doctors to db).
One of the thing they complain about was funny. The software closes all instances of internet explorer when the user session is expired and they are not happy with that. Without checking the code, I told them to use firefox to browse the internet but continue using ie for their software. Well simple solution but works ok for them. Rest of the problems, i suggested not modifying the current software since nobody knows the structure so it will take too much time and would be so fragile. Instead we can make a new one which has only the features the current one lacks. So they would need to run both same time.
Well the other option I suggested was if they have enough budget and time to built a new one from strach with new and modern technologies like Java and Flex.

DZone publishes RefCards

A colleague just send me a link Spring Configuration Reference Card. There is also other versions such as GWT, Ajax and Eclipse. The best thing about these articles is they are all written by authors of related "in action" book from Manning. Personally I really like In Action series, so I will regularly check for new ones. You want to check? Click this link

Tuesday, 20 May 2008

JavaFX on JavaOne

JavaFX was the most interesting topic on last year's JavaOne. Well for one year we have been waiting and this year it looks more stable and more complete but still i am not happy with tool support and maturity.
If you still haven't you should watch this years JavaOne presentation of JavaFX. Better to see with your eyes pros and cons to decide better at choosing the tecnology.



Well looks nice, hope JavaFX can go on...

Design Patterns Revisited (2)- Decorator Pattern, Decorating your software

The decorator pattern is the second most used pattern for me after singletons. I really recommend you to read chapter 3 on Head First Design Patterns which I think has the best example for the topic.
Here is a real life story; Several years ago one of my colleague and I developed a software for Order and Payment management of Restaurants. That time we had concrete product objects with price property. In time some restaurants started asking for products which can have extras like pizza but with extra cheese or kebap but with yoghurt. We asked them to create new products from back office for that extras which changes price of the product. What we failed was we thought if the price changes there is no harm to create that as a new product but imagine a pizza with combination of 20 different ingredients.
Long years after it is so easy to see what we had failed. We needed to decorate the products instead of just adding a detail text which can't update the price (just like we did).
Decorator pattern is very easy to understand, use and implement. Lets imagine we have a car factory and we offer a variety of options to our customers like, sunroof, airconditioner, airbags etc.
First of all we need create our car object, to make it simple I will be demonstrating a concrete car object but the best use should be creating a car interface and built your car objects implementing this interface.

public class FamilyCar{
private String description="This is family version 5 door";
private double price=10;
public String getDescription(){
return description;
}
public double getPrice(){
return price;
}
}


So far so good, but as our car hits the stores, customers would like options like sunroofs, extra airbags, child seat, a/c and we can't give those for free. So lets create a decorator, again for ease of understanding i am creating a concrete decorator class, but in real life we should do that via interfaces for extensibility.

public class Sunroof{
private FamilyCar familyCar;
public Sunroof(FamilyCar familyCar){
this.familyCar=familyCar;
}
public String getDescription(){
return familyCar.getDescription()+" with sunroof";
}
public double getPrice(){
return familyCar.getPrice()+(familyCar.getPrice()*0.1);
}
}


So simple, you want to sell a family car with sunroof, create a family car object and decorate it with sunroff, thats it. You may have notice right now we cant handle to sell a car with sunroff and airbag (imagine we also have an airbag decorator) which is not good. So lets change our implementation...

public class FamilyCar implements Car{
...

public class Sunroof implements Car{
private Car car;
...

public class Airbag implements Car{
private Car car;
...

Now you can create a family car decorated with sunroof and airbag and the price would be calculated automatically.

new Airbag(new Sunroof(new FamilyCar())).getPrice();


You may have different interfaces for your Car and Option decorators and let your decorator interface to extend your car interface so you would seperate implementations. Either way you choose, you will have vast variety of options to decorate your car and you will be the most extensible car dealer who can offer any price for any options wanted by their customers.
Not bad? lets burn some rubber and do not hesitate to use the decorators whenever you think they might work...

Friday, 9 May 2008

Design Patterns Revisited (1); Singletons, how single they are..

Well enough about giving thoughts or chatting about flex, lets get back into important stuff. I decided to give write several posts about design patterns. Either you use or not they are important and make your life easier (and probably increase your salary). Even you really not interested in design patterns, you will face questions about some in interviews or architectural design meetings. So better open up your brain and learn some, nothing wrong to impress few colleagues.
The first pattern I will post is the Singleton Pattern. The mighty gof explains this pattern as; "Ensure a class only has one instance, and provide a global point of access to it.". Simple isn't it, if you need only one instance of a resource mostly because it would be expensive to create and hold new instances, you make sure there is only one unique living instance of that object. Singleton objects are god and if you don't want chaos, conspiracy and fight like Olympian Gods than you must make sure you have only one!
Back to basics how do we construct and instantiate an object.. yes just by using the constructor. Even we don't type the compiler creates a default one for us. So to take control from the compiler we just create a default non-argument constructor and mark it as private. So we ensure no one would ever has access to it, to create a new instance(A). Next we type a public static method so whoever wants to use our object must use that entry point to access(B).
public class SingletonObj {

private final static Singleton instance = new Singleton(); // our unique instance

private Singleton() {} //A

public static Singleton getInstance() { //B

return instance;

}

}

This is the most simplest way to show a singleton. You may also want to use a static initializer so our "instance" will be initialized only when it is first accessed.
public class SingletonObj {

private final static Singleton instance = null;

static {

instance = new Singleton(); // our unique instance

}

private Singleton() {} //A

...

Or you might check if it is initialized in getInstance method.
public class SingletonObj {

private final static Singleton instance = null;

private Singleton() {} //A

public static Singleton getInstance() { //B

if (instance == null){

instance = new Singleton(); // our unique instance

}

return instance;

}

}
All of the examples above works quite same and ensures the current running JVM has only one instance. Most experienced ones are now quite ready to leave a comment on how to hack this design. Ok, you can't just really ensure, but it is a hack and you must be expecting your colleagues not trying to break your design and mess up with resources :)
Since JVM lets us to access even the private methods by reflection and once we get the methods it is possible to change the access rules and create new instances. Here is how to create more instances from a singleton;
public class SingletonHack {

public static void main(String [] args);

Class clazz = Class.forName("SingletonObj"); //we load the class

Constructor[] cons = clazz.getDeclaredConstructors(); //get the constructors

cons[0].setAccessible(true); //change access rights

SingletonObj noMoreSingleton = (SingletonObj) cons[0].newInstance();

//we have brand new instance

}

Actually this is not something new and I'm quite sure most of you already new it. Java is just like having jedi powers. "The dark side of the force is a pathway to many abilities some considered to be unnatural". When you really need, it offers a dark side to make things work but you shouldn't be using that powers and staying on the light side. If you feel you need such a hack you must look back and try to find what did you do wrong and put yourself in Anakin's shoes :)

Sunday, 4 May 2008

IBM on Java EE 5

As a former Websphere specialist I must confess lately I had been really far away from websphere platform. After our Eclipsist presentation we had some questions about Websphere 6 & 7 aplication server compability with ejb 3. First of all IBM has released Websphere 7 which runs on Java EE5 so any one using WAS7 can use our EclipsistEE project.
The second and interesting news is IBM also released a SOA feature pack equipped with EJB3 for WAS 6 (which will be called 6.1). I remember every new feature or fix pack of IBM really made me nervous since they come up with new problems but this time the change is worth to try so I encourage all EE developers to try new featues. At least how bad could it be than EJB 2...

Friday, 2 May 2008

Eclipsist Presentation Available...


At last just as we promised on our workshop full source codes with jar files are available as eclipse project on our cvs server. You can check out the projects by these settings;

Connection type: pserver
User : eclipsist
Password: eclipsist
Host: yenerm.homeip.net
Repository path: \sys\okyanus

If you face any problems while checking out please feel free to contact us. You may face connectivity problems and slow transfer rated since this is an home server.


We have so many positive feedbacks and want to thank you all. We also have your negative comments and concerns. I am sure most of java and eclipse guys dont trust flash runtime just as they trust jvm but hey youtube runs on flash streaming, microsoft makes vista and silverlight presentations with flash and Flex is so much mature than JavaFX so why dont you give flash a chance. Also dont forget Flex SDK is open source and comes with it is own jre so actually it is not really leaving Java environment.
Also some people might think we could built the project so fast and easily since we are experienced on those tecnologies. Well no you are wrong, we migt be experienced in some but we are not using EJB3 or BlazeDS in production but we could manage to code them just as Spring and WebServices. Please do not afraid and just try to code on your own.. and if you still have trouble let us know. May be next time it will be better to guide a volunteer who is not interested and let him/her to code, to show you how easy it is.
Finally thanls to all our collegues and so many thanks to Naci Dai and his team who let us have this chance..

P.s. we are planning to publish a screencast to show how easy to code to people who didn't have chance to attend the workshop...

Sunday, 27 April 2008

EclipsIst 2008

This year my colleague Yunus and I am going to make a presentation and a workshop about developing a fast and extensible end to end project. The idea of the presentation is not coupling to a particular technology in the back end.  We will aggresively change persistance layers since they are encapsulated with JPA, use either either Spring or EJB, communicate with front end either on WebServices (again interchangable between CFX, Axis, Metro..) or via Remote Calls using BlazeDS. We will be using Adobe's Flex 3 for front end and actually i think this is the only techology we won't change during presentation since no other competitor still can offer a capable one. 

We will be presenting a huge architectural diagram with many alternative road maps on 29th april and we will be doing the workshop on 30th april. We hope you can come up with new technologies and ideas so we can try on the fly on 30th. See ya' there..

Thursday, 21 February 2008

Java Day '08

This year Java Day was was on 19th February at Hilton Convention Centre. Luckily heavy snow stopped the previous night so we could manage to arrive Hilton without much problem. Actually I was a little worried about the presentations since most of the presenters were same from previous year but Sun's evangelists had managed to update the content and present new materials.
First session mostly consists of sponsor presentations which is actually not much more than an advertorial session. First session ended with demonstration of planned features of Java SE7.
After lunch session had more rich content. Doris Chen presented new trend Ruby and JRuby. Personally I don't really believe in Ruby and find Ruby syntax ugly but I am not the one driving the trends so still it was nice to watch that presentation. She also presented Java EE5. Although EE5 is not a new subject the comparison with J2EE1.4 was out standing. I really wonder why vendors are not interested in Java EE5. Mostly developers complain that Spring already has all the functionality of EE5 but why not too improve an alternative. For years Java EE5 is on market but neither J2EE1.4 users nor Spring users migrate to that platform. Either Java EE5 is so bad or J2EE1.4 scared developers that much that nobody even thinks to research on that. I still insist that there should be other alternatives to both J2EE1.4 and Spring, and JEE5 is a good choice for that. The headliner of the show was JavaFX. Simon Ritter gave a nice and brief presentation of JavaFX. In my point of view JavaFX is a nice scripting platform sitting on top of the most mature JRE on market and new features like consumer JRE would be so nice for JavaFX. The problem is rivals of JavaFX is already on the market and no body has enough patience for Sun to complete JavaFX. There are many missing features when compared to Adobe's Flex. Adobe already delegated animation and design material to flash so by Flex they can offer a platform full of back end connections, remoting, rich client interfaces on a widely distributed Flash Engine. Actually to tell the truth still JavaFX is more ahead of Silverlight which even has a button component yet. But Microsoft offers great IDE and tool support so even silverlight seems more complete then JavaFX. Sun should be fast enough to deliver and promote JavaFX because I am sure Microsoft will make Silverlight more complete by next release and they have a great advantage that they can distribute the Silverlight plugin with Windows Update. I hope by JavaOne JavaFX would be more complete, has more tools and has more books.
Last presentation was Sun's Spots again Sun did a good job but they don't promote this platform. I think by the time people know and have this devices, they would be technologically out dated. So sad that this devices were presented on JavaOne 2006 but until last month they were not available outside US. Now they are also available in Europe with a price tag over €500. I am sure if Microsoft had a similar product they would sell it with a more affordable price and even maybe give it free to related developers. Last year Angelo Caicedo presented those devices, this year since she was not there Simon gave the presentation but he really seemed to be using the devices first time in his life. Still lots of people were amazed with the product and its features but I wish they could watch that presentation from Caicedo.

Monday, 28 January 2008

Visual Studio 2008 Test Drive

I haven't been posting for a long time so here comes a long one :)

Last week I was at Microsoft Headquarters in Turkey for a test drive of Visual Studio 2008 "new" features. Actually the features are all new to Microsoft but not so new to rest of the software development world.

First day we had sneak peak at Team System, I must admit Microsoft did a great job with integrating Project, Office, Team Foundation Server and VS 2008. I believe planning and task management can never be easier. After lunch session was really suprised me. All the attenders except for us were working with only Microsoft products and they really had hard time at understanding this concepts. Java and open source world may not have such a perfect integration but it seems we are much more familiar with this terms and concepts.
Second day started with workflows. I had met the presenter long ago actually once he offered me a position in his company but he didn't remember me this time. I knew he knows much about Java and open source world. Everyone watched the presentation were very impressed with the product and actually his presentation was good. However the product did not offer anything new, I asked what does this one offer more than BPEL I have used 5 years ago. His answer was short and explaining "nothing more but Microsoft didn't have that..." After lunch session was amazing Daron Yöndem made an amazing presentation of an amazing product the WPF. Just imagine a very very easy flash with an easy scripting engine. The integration with Vista's Aero was marvelous. I think WPF will really rock desktops and I am not sure if Adobe's AIR can really compete with it. By the way Daron also introduced us the new desing Studio called Expression Studio. Looks like someone at Microsoft ordered the development team to clone every Adobe product on the market. The problem is most of them are not complete and not as capable of originals but some like Blend and Media are really easy to use and can produce good stuff.
Third and the last day started with the famous Silverlight presentation again by Daron. However this time Daron could not impress us since the product was a total disaster. I can't imagine how can Microsoft even think to compete with Adobe's Flex in rich media. Actually they might not even have a chance against JavaFX which is not really on the market. Silverlight should be labeled as 0.1 alpha or may be not even that much. Think of a rich client design platform which does not even have form components or button! If you plan to stream video Silverlight works but again why would anyone choose it since there is a stable and complete video streaming platform like Flash. Come on even YouTube ows its success to Flash's streaming capabilities. Silverlight does not offer any single thing if you don't plan to stream media. It has no components, all the code written which is xml just as Flex, is carried to client and compiled there. I can't imagine how someone could have a software design like that. All the code written becomes open source. Well no components, not compiled code carried to client but the worst comes now... Silverlight does not have its own Script Engine!!! It uses javascript, well actually it just "communicates" with the javascript running in the browser. I think Microsoft would get an Oscar on Comedy, they say Silverlight is cross browser and even cross OS but they choose the programing language that is not cross browser!!! Funny part is Daron used an IDE based on famous Java IDE, the Eclipse (Flex uses that too) for coding Silverligt. I have coded a simple application and got the second shock. The silverlight Virtual Machine could not run the code and asked me for an update but could not update itself either and all these were happening in Microsoft's Headquarters and the subject was test driving their new stuff esspecially Silverlight. Even their own computers can't run silverlight how can consumer pc's would?
Microsoft really failed in the design of Silverlight. They took every single thing Java applets failed and refused to take everything which lead Flash to success. Flash VM gets updates smoothly and has no version clashes but Silverlight choosed to have version and update problems just like Java VM. They also failed in encapsulating the engine and the code. Everything is open, xml travels to client compiles there (if it can..) communicates with the running javascript (again if it can and if the browser can run that js) and still it does not even have major components. Flex would knock out Silverlight in seconds in RIA arena, with the perfect IDE based on Eclipse (but slow!!), well designed and manageable VM, open sourced BlazeDS, community and with the oo coding engine action script 3 which is just looks like java or c# .
The last session was another headliner the Linq which is a very good improvement for .net but for me offers only xml querying more than Hibernate does. Well at least Visual Studio has its own ORM now. Even the anotations are same with hibernate.

I think Microsoft users really lack of research, reading and investigating new stuff, they just use what comes out of Visual Studio box. For example none of them was aware of nHibernate which works with .net. Hibernate is such a mature tool when compared with linq. How could they expect similar performance? They never heard of something called spring.net. I must admit visual studio is a very well integrated and really productive environment but why not to look for other stuff when it lacks in something?

Now I feel really much happier as a Java&Flex developer..