I.T. aware

Sébastien Letélié and Cyril Balit weblog
  • English
  • Français
  • en
  • fr
  • Blog
  • About

Java BarCamp Paris 4th ed. : Cloud and DDD

Sébastien Letélié | 5 avril 2009

A big success! It was full of people in the great Google’s office. 2 schedules / 4 rooms and a total of 7 sessions, I present the both where I participated :

Cloud computing
Not really a Java subject but it attract people. We tried to define the cloud computing and we fixed that there is 3 offers :

  • IAAS (Infrastructure as a Service): this is typical Amazon services products, S3 for storage and EC2 for virtualized servers. Amazon offer very basic service now with a very powerful management tool in Eclipse plug-in (see the demo). There is also Elastic Grid proposing to develop and deploy easily on the Amazon infrastructure, GoGrid an Amazon concurrent. I believe that the recent IBM / Sun merge will create new offerings.
  • SAAS (Software as a Service): we find a lot of solutions (often based on the previous offer), for example Amazon SimpleDB, Amazon SQS, Google Apps, Microsoft Azure Services CloudMQ, ZumoDrive … and I could continue like a long time…
  • PAAS (Platform as a Service): is hosting the application on a common and scalable platform, it is typically Google AppEngine, it is possible to deploy all yours web application if you know Python. Microsoft probably has a deal in Azure (I should have a look) and Sun has just launched Zembly.

A lot of discussion on what about offline, security, and where is java in the cloud. For me offline mode is really important in a world of increasingly nomad people. Cloud is primarily storage space allowing me to share my data between my devices, then an area of services, and finally deployment platform of my apps.
Finished managing a backup that is never done, losed time finding  a way to share data and finally used USB key, now my data are in the cloud and synchronized on all my devices. I have set up Zumodrive in my company and it’s very cool, the documents are shared even outside the company and I don’t care about backup.
Security is the most bigger difficulty for acceptance in the company, I hear the same remarks when talking about the payment on Internet ten years ago. All these services are secure and there is no zero risk.
Java have his place in the cloud on client and server side. The multi platform aspect facilitates the developments on the client (eg: ZumoDrive client is in Java), I want to see more and more Java APIs “cloud-ready” facilitating the integration of service in code. Similarly on the server side I look forward to Google AppEngine in Java.
Finally the advantage of cloud computing is primarily economic, smalls company are the first customers and have found lower cost and flexible capabilities.

DDD (Domain Driven Design)
I had little success at the last barcamp with this subject, this time it was proposed by others much more stronger than me and have made relevant arguments on the benefits of the concept. One of the important point raised we used talking too much technical and framework implementation than focus more on the reality, something that we tend to forget wanting to put our new framework in our code. I talked about Qi4j, that is not pure DDD implementation, but is for me the best way to modelling reality. I want make a demo of my medical record implemented with Qi4j to really prove that this approach is relevant.
Of course I’m convinced that a DDD refactoring of an existing code is difficult. DDD is a best practice and a new way of development vision. Have to follow for sure …

Thank you again to the organizers. It is always a good opportunity to exchange. And i hope Google will open their doors as often as possible;)

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Commentaires
Pas de Commentaires »
Catégories
Anglais, Eclipse, Java
Tags
cloud-computing, ddd, qi4j
Flux rss des commentaires Flux rss des commentaires
Trackback Trackback
1 435 views
Print This Post

Server-side OSGi, is it really useful ?

Sébastien Letélié | 19 octobre 2008

The recent Paris JUG was an opportunity to talk about OSGi technology, already mentioned several times in this blog, and continues to hear about it. Although OSGi is present on the client side with Eclipse, the development of the server side and especially in Java EE environment sometimes leaves developers not convinced. Spring Source (Spring DM server), ObjectWeb (JOnAS), Sun (Glassfish) and IBM (WebSphere 6.1) have clearly made the choice. What are the real benefits for our applications on server side?
First don’t forget OSGi is a specification designed for the embedded domain. This make an implementation without the new Java 5 features : annotations, generics, etc … and that makes us appear OSGi like an old technology. But OSGi stay attractive because what is important above all is the concept: modularization. Concept that on each ear of OOP developer can not be ignored. By development on development we have tried to improve the way we write code, trying to organize it to not create inter-dependencies and go over possible reusability. The arrival of the DI pattern help us to do that and the success of Spring is a good example. OSGi creates a continuity in offering us an infrastructure that obliges us to respect the rules and allows us to dynamically manipulate our components. The dynamic aspect and hot deployment is the icing on the cake but this is not what makes OSGi essential on server side, the current deployment technics with clustered servers, or even with the simple WebObjects Monitor tool, help us to update applications gracefully. What is interesting it’s how the code is organized and the hierarchy throw the management of dependency imposed by OSGi, in application servers and applications themselves.
So in fact this specification is not suited to Java EE and remains technically difficult to understand, but the concept of modularization is a good approach to improve the quality of our developments. That is why Spring focused on because it fits with their framework.
Moreover reconciliation between JCP and OSGi promises well, I hope in the right direction, to make the best of 2 worlds, i.e. all existing OSGi in one hand and the server aspect and Java 5 new features for Sun on the other.
However, we must not forget the dynamic aspect because although users are not insist to see a new button dynamically appear at each time thez need a new functionnality, the fact is with OSGi it is technically possible. But is it really an improvement, actually with a web application it is also possible in PHP, in Java (must reload session). For RIA this becomes more complicated because part of the functional is deported on the client side and update requires complete reloading. This is typically what Chris Brind has managed to improve by combining Flex and OSGi with Solstice. This framework show the potential of modular approach in this domain.
Again what is important is the concept, the modular approach will bring us more quality in our development and greater flexibility in deployment. Let the community choose the best technology to do it…

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Commentaires
1 Commentaire »
Catégories
Anglais, Eclipse, SOA
Tags
jsr 277, modular approach, osgi, solstice
Flux rss des commentaires Flux rss des commentaires
Trackback Trackback
2 761 views
Print This Post

BIRT DESIGNER-Hide/Show a component

Cyril Balit | 1 octobre 2008

On a project using BIRT I was confronted with this problem. I generate complex reports using components and datasets defined in a library. I wish to show a component only if the bound dataset contains data.
The operation is simple but I looked for the most generic solution. Indeed the component will be used in some reports and the update operations have to be the simplest as possible.
Lire la suite »

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Commentaires
4 Commentaires »
Catégories
Anglais, Eclipse, Java
Tags
birt, birt designer, Java
Flux rss des commentaires Flux rss des commentaires
Trackback Trackback
3 395 views
Print This Post

Asynchronous Web Applications

Sébastien Letélié | 2 mai 2008

It is a fact, web applications become asynchronous. AJAX maked end of long response time due to the old practice of response-loop request to load a whole page. Before AJAX this technique was already used with a hidden Applet which accessed to a MOM (Message Oriented Middleware). Do the MOM become itself as the exchange architecture the most appropriated for web applications ?
Lire la suite »

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Commentaires
Pas de Commentaires »
Catégories
Anglais, Eclipse
Flux rss des commentaires Flux rss des commentaires
Trackback Trackback
1 279 views
Print This Post

Revision control with Mercurial

Sébastien Letélié | 25 décembre 2007

Mercurial is a distributed revision control system. Instead of centralized system like CVS or Subversion the whole revisions are stored locally and by all developers. A different approach good for work in disconnected mode and to manage backups. An eclipse plugin exist.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Commentaires
1 Commentaire »
Catégories
Anglais, Eclipse, General
Flux rss des commentaires Flux rss des commentaires
Trackback Trackback
1 036 views
Print This Post

Groovy and DSL

Sébastien Letélié | 6 décembre 2007

We were lucky receiving Guillaume Laforge at Improve for a Groovy and DSL presentation.
I didn’t have time to really study script languages, i just take a quik look on Scala and Groovy and not on JRuby and Jython. I worried about the capacity of the developers to debug with this languages. I had a lot of problems with Javascript. We were agree with Josh Marinacci in our last exchange to say that this technology is really interesting but how we can control it. Guillaume put me at rest it’s not really a problem, developers don’t make really more mistakes than they do in Java, and now IntelliJ have a great plugin which manage debugging, color syntaxing, content assist, refactoring… The Eclipse plugin haven’t it yet but it comes.
It’s clear Groovy is a really great tool to realise DSL. The syntax is malleable and readable. His extension capacity with category concept (like in Objective C) or with operators is really great.
I forgot to ask him what’s he thinking about JavaFX. The Chris Oliver’s DSL to create Swing UI is not based on Groovy for this reason, is it a good reason ?
For your information Guillaume has created a company G2one offering services around Groovy and Grails. The slides he shows us are available on grails-exchange. Guillaume will be at JavaPolis.
Thank’s a lot Guillaume and see you soon ;)

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Commentaires
Pas de Commentaires »
Catégories
Anglais, Eclipse, Java
Flux rss des commentaires Flux rss des commentaires
Trackback Trackback
1 166 views
Print This Post

RCP with Guice

Sébastien Letélié | 27 novembre 2007

To make my RCP application a little SOA oriented i choose Guice. It’s easy and quick to implement. To call a service you use :

Guice.createInjector().getInstance(aClass);

aClass is not a service but an object using injected services, then you can’t create a ViewPart including service, you must use an intermediate object : a controller.
For example you have a ViewPart (MissionViewPart), a controller (MissionViewController) and a service (MissionService). The declaration look like this :
Lire la suite »

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Commentaires
Pas de Commentaires »
Catégories
Anglais, Eclipse
Flux rss des commentaires Flux rss des commentaires
Trackback Trackback
1 323 views
Print This Post

XML SWT Design

Sébastien Letélié | 20 novembre 2007

After Dave J. Orme XSWT for SWT in XML, Tom Schindl extend it with EXSWT. When i choose RCP to develop my applications, i began directly with XML to design my UI. I think it’s a good way because it reduce your code (even if now you can mask it with your Java editor), but the most important reason is the loosely coupled aspect and the capacity to have more than one version of your UI. For example if you have one application and many customers, it’s sure that some customers want different design or evolution of the UI. An XML UI is the best way to personalize the UI. For example, adding XInclude in your EXSWT file give you the ability to choose within different version of a part of your UI by managing the resolution of the “href” attribute.
Lire la suite »

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Commentaires
7 Commentaires »
Catégories
Anglais, Eclipse
Flux rss des commentaires Flux rss des commentaires
Trackback Trackback
3 089 views
Print This Post

Interaction between web and desktop application

Sébastien Letélié | 15 juillet 2007

Browser component in Eclipse RCP application offers the possibility to mix web and desktop applications. There’s a lot of advantages of this, in particular when it concern reuse of an existing web application. One of the interest is to never be dependant of the browser but to make your application become the browser.
To make this working it’s necessary to communicate between web and desktop, it’s relatively easy to send data to browser by using (setURL()) or by executing Javascript (execute()). But for sending data to the desktop it’s more difficult. I suggest 6 solutions to do that :
1. via the status bar : like it show on the SWT snippets site (Snippet160)
2. via the address bar: like Peter Nehrer say
3. directly request HTML DOM : by using Mozilla Browser (new in 3.3) with the XPCOM library. A little example using the Snippet267 and modify it to use XPath and catch a title of an input field. There’s a lot of possibility with this API like ATF do (maybe i have to take time to make an article about the possibility offers by XPCOM).

static Browser browser;
public static void main(String[] args) {
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setLayout(new GridLayout(2, true));
    shell.setText("Use Mozilla's Design Mode");
    try {
        browser = new Browser(shell, SWT.MOZILLA);
    } catch (SWTError e) {
        System.out.println("Could not instantiate Browser: " + e.getMessage());
        return;
    }
    browser.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));
    Button searchButton = new Button(shell, SWT.PUSH);
    searchButton.setText("Search");
    searchButton.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event event) {
            search();
        }
    });
    browser.setUrl("http://www.google.com");
    shell.setSize(400, 400);
    shell.open();
    while (!shell.isDisposed()) {
        if (!display.readAndDispatch())
             display.sleep();
    }
    display.dispose();
}

public static boolean search() {
    nsIWebBrowser webBrowser = (nsIWebBrowser) browser.getWebBrowser();
    if (webBrowser == null) {
        System.out.println("Could not get the nsIWebBrowser from the Browser widget");
        return false;
    }
    nsIDOMWindow window = webBrowser.getContentDOMWindow();
    nsIDOMDocument document = window.getDocument();
    nsIDOMXPathEvaluator xpath = (nsIDOMXPathEvaluator) document.queryInterface(nsIDOMXPathEvaluator.NS_IDOMXPATHEVALUATOR_IID);
    nsIDOMXPathNSResolver res = xpath.createNSResolver(document);
    nsISupports obj = xpath.evaluate("//input[@name='q']/@title",
                                                 document,
                                                 res,
                                                 nsIDOMXPathResult.STRING_TYPE,
                                                 null);
    nsIDOMXPathResult result = (nsIDOMXPathResult) obj.queryInterface(nsIDOMXPathResult.NS_IDOMXPATHRESULT_IID);
    System.out.println(result.getStringValue());
    return true;
}


4. via a socket : by executing an XMLHTTPRequest with execute() method which call a socket and get the content.

private String getDataFromBrowser() {
	String javascript = "try {";
	javascript += "xhr_object = new ActiveXObject(\"Microsoft.XMLHTTP\"); ";
	javascript += "xhr_object.open(\"POST\", \"http://localhost:9091\", false);";
	javascript += "xhr_object.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");";
	javascript += "xhr_param = generateXML();"; // appel d'une fonction retournant un contenu
	javascript += "xhr_object.send(xhr_param);";
	javascript += "} catch (ex) { alert(\"Failed to save document\"); }";

	String xml = null;
	XMLPicker e = new XMLPicker();
	Thread t = new Thread(e);
	t.start();

	// wait threa run
	try {
		Thread.sleep(10);
	} catch (InterruptedException eee) {
	}
	// ask browser
	boolean ok = browser.execute(javascript);

	int wait = 0;
	while (xml == null && wait < 10)
		try {
			Thread.sleep(10);
			wait++;
			xml = e.getXML();
		} catch (InterruptedException eeee) {
		}
	System.out.println(xml);
	return xml;
}

private class XMLPicker implements Runnable {
	private String xml;
	public String getXML() {
		return xml;
	}

	public void run() {
		ServerSocket server = null;
		try {
			server = new ServerSocket(9091);
			server.setSoTimeout(5000);
			System.out.println("Waiting for response");
			Socket socket = server.accept();
			// stream treatment, i can give the HTTPServer class if you want
			xml = HttpServer.getXMLString(socket, "UTF-8");
			socket.close();
		} catch (IOException ee) {
			System.err.println(ee);
		} finally {
			if (server != null) {
				try {
					server.close();
				} catch (Exception e) {
				// Ignore.
				}
			}
		}
	}
}

5. running an HTTP server inside the Eclipse JVM : with Tomcat embedded for example or with WebObjects (Application.primeApplication()). The objects in the same JVM can be shared but be carreful of classloaders.
6. via terracota : a JVM cluster offer an easy way to synchronize objects between JVM.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4,00 out of 5)
Loading ... Loading ...
Commentaires
Pas de Commentaires »
Catégories
Eclipse, RIA-RDA-RWA
Flux rss des commentaires Flux rss des commentaires
Trackback Trackback
1 791 views
Print This Post

GWT-Plugin CYPAL

Cyril Balit | 22 juin 2007

Ok the news is not hot (Didier was talking about it in onGWT on April) but i just try Cypal Studio plugin for eclipse and i found it really interresting. The features are the one you can expect for that kind of tool (project creation wizzard, compilation, creating module and remote service…). To have if you start GWT project.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Commentaires
Pas de Commentaires »
Catégories
Anglais, Eclipse, RIA-RDA-RWA
Flux rss des commentaires Flux rss des commentaires
Trackback Trackback
1 183 views
Print This Post

« Entrées Précédentes

Recherche

Twitter

  • Implementing DCI in Qi4j | Javalobby: http://bit.ly/d65u5M 2 days ago
  • Google Reader Play http://bit.ly/aMIPRM 6 days ago
  • BIRT is Mobile! - BIRT Exchange: http://www.birt-exchange.org/blog/2010-03-10/birt-is-mobile/ 1 week ago
  • Zenika lance les ZenLabs http://tinyurl.com/yfwq3j3 1 week ago
  • Microsoft Courier = Microsoft Tablet : looks great !http://bit.ly/d7EZgL 1 week ago
  • More updates...

Powered by Twitter Tools.

Profils

  • Viadeo
  • LinkedIn
  • Twitter
  • FriendFeed
  • Blogs

    • Damien Viel
    • David J Orme
    • Didier Girard
    • Improve Technologies
    • Java Desktop
    • Jerôme Denanot
    • Joshua Marinacci
    • Le touilleur
    • Planet Eclipse
    • The coder’s breakfast
    • Tom Schindl
    • Wiki Improve
  • Open-Source

    • Monoi
    • Rialto
    • Tom’s Quest
    • XDI
  • English Feed French Feed rss Flux rss des commentaires valid xhtml 1.1 design by jide powered by Wordpress get firefox