The Artima Developer Community
Sponsored Link

Java Buzz Forum
I want a console, dammit!

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Carlos Villela

Posts: 116
Nickname: cvillela
Registered: Jun, 2003

Carlos Villela is a Java developer working mostly with web technologies and AOP.
I want a console, dammit! Posted: Jul 9, 2003 2:32 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Carlos Villela.
Original Post: I want a console, dammit!
Feed Title: That's sooo '82!
Feed URL: http://www.jroller.com/rss/cv?catname=Technical
Feed Description: Carlos Villela's weblog. Everyday life, everyday software development, everyday musings.
Latest Java Buzz Posts
Latest Java Buzz Posts by Carlos Villela
Latest Posts From That's sooo '82!

Advertisement
Here I was, sitting in front of Eclipse, with nothing better to do than hack on Inectis while drinking a cup of hot strawberry tea. After getting a little tired to work in its administrative interface (which is, unfortunately, not going to be released as OpenSource, so I'm only working in it for the money, and am not really motivated to work hard on it), I decided to give JavaScript a try again.

I created a run task for the JavaScript interpreter shell in Eclipse, and set its working directory in the same place I run my Tomcat instance from, so I'd get all the persistent objects conveniently located in _txLogs (the default directory where AspectWerkz stores Prevayler transaction logs).

Voila! I had a command-line interface for Inectis. I don't need no steenkin' UIs anymore after this. I can have all the freedom in the world to change, move, rename or delete my objects. Don't believe it? Take a look at this sample, then:

js> ep = Packages.inectis.plugins.core.entities.EntryPoint();
inectis.plugins.core.entities.EntryPoint@1e893df

js> home = ep.getHomePage();
inectis.plugins.core.entities.HomePage@1de17f4

js> home.name = "Inectis: CMS revolution, one aspect at a time";
Inectis: CMS revolution, one aspect at a time

js> information = ep.createFolder("General Information");
inectis.plugins.core.entities.Folder@476128

js> overview = ep.createFolder("Overview");
inectis.plugins.core.entities.Folder@618d26

js> features = ep.createFolder("Features");
inectis.plugins.core.entities.Folder@32784a

js> license = ep.createFolder("License");
inectis.plugins.core.entities.Folder@1f82982

js> news = ep.createFolder("News");
inectis.plugins.core.entities.Folder@db4fa2

js> information.addFolder(overview);
js> information.addFolder(features);
js> information.addFolder(license);
js> information.addFolder(news);

js> home.addFolder(information);

js> homeContent = ep.createContent("Inectis Overview");
inectis.plugins.core.entities.Content@1bdc9d8

js> homeContent.html = 'Inectis is a Content Management System entirely built with Aspect-Oriented Programming concepts...';
Inectis is a Content Management System entirely built with Aspect-Oriented Programming concepts...

js> home.addContent(homeContent);

js> quit();

This can't be that easy, I think - something's gonna blow up when I start Tomcat and reload the page. It can't be that easy. In had a total of zero lines of code in the system regarding persistence, this just can't be this easy. But yeah, fellas, it's that easy. Zero lines of code, zero lines of XML definition for persistence, and here it is: Tomcat starts, and everything shows up exactly as (un)expected. Life is good. Smile :)

Read: I want a console, dammit!

Topic: Tutorial de Plugins para o Eclipse Previous Topic   Next Topic Topic: OGNL and Struts

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use