Today, I was surfing the net and reading some articles. I read a comment about something that mentioned the Java based OS; JNode.. WOW...
Finally.. I am very happy for it. Very happy more than any one can ever know.
Last year I was thinking why not having a Java based OS. Imagine you can just simply write Java code and save it locally and then type a command to compile it (i.e., compile MyFile.java) and to run it, just type: MyFile
Any way,.. this is not the case. But it still could be done.
I really like it very much... :)
I was thinking of such an idea by eliminating the entire native part and moving the JDK to be part of the processor or something. That was in my previous (old) blog entry I had.
Well, of course, it had a lot of troubles for having the native related stuff moved to the processor as mentioned in the comment. But any way.. it was just an idea.
Still, I am very happy for the JNode project. I wish it would make it to the public and be a well known OS. Best of luck.. :)
http://www.jnode.org
Tuesday, August 26, 2008
Tuesday, July 15, 2008
And I have another crazy idea...
It's been a while now since I had this small idea in my head. Some people may thing that I am crazy...
But what the heck.. all brilliant ideas and thoughts were considered to be crazy at its early stages :)
Imagine that you can go to your favorite search engine, Google for example, and you go find the following options
1- Web (text search) - which already there and the default
2- Images (based on text search) - which is already there an accessed when you click on Images
3- By image (which the idea I have).
The idea is very simple:
You upload an image you have, and then click search.
- The search result?
It will be any URL or page that contains or references the same image.
- Why?
1. Cause I cannot remember how many times I saw a picture of something and do not know what is it and wanted badly to know.
2. Cause I cannot remember how many times I saw a picture of someone/something and I was hundred percent positive that I saw it before somewhere on the web but I cannot remember where.
3. Cause you may have a picture of someone you know and have not seen him for a while. One of the options to find him would be using his picture (names may change or not be used).
4- It is still a good idea.. :)
Well, I know that such a search engine would take a lot of time doing processing (I have seen it in the movies with specific comparison points of the face - US Police and FBI search for criminals).
It is implemented, and it is there.
It is heavy a processing search. I know all of this.
But still, why not having it public like text based search...?
Well, it is a crazy idea.. :)
But what the heck.. all brilliant ideas and thoughts were considered to be crazy at its early stages :)
Imagine that you can go to your favorite search engine, Google for example, and you go find the following options
1- Web (text search) - which already there and the default
2- Images (based on text search) - which is already there an accessed when you click on Images
3- By image (which the idea I have).
The idea is very simple:
You upload an image you have, and then click search.
- The search result?
It will be any URL or page that contains or references the same image.
- Why?
1. Cause I cannot remember how many times I saw a picture of something and do not know what is it and wanted badly to know.
2. Cause I cannot remember how many times I saw a picture of someone/something and I was hundred percent positive that I saw it before somewhere on the web but I cannot remember where.
3. Cause you may have a picture of someone you know and have not seen him for a while. One of the options to find him would be using his picture (names may change or not be used).
4- It is still a good idea.. :)
Well, I know that such a search engine would take a lot of time doing processing (I have seen it in the movies with specific comparison points of the face - US Police and FBI search for criminals).
It is implemented, and it is there.
It is heavy a processing search. I know all of this.
But still, why not having it public like text based search...?
Well, it is a crazy idea.. :)
Distributing a Java Application via CD-ROM - Why?
Today, I was checking Java.net web page. I read the article of Distributing a Java Web Start Application via CD-ROM
Well, that is my initial thinking of its possible usage scenarios:
1- It could be used for installation CDs
2- It could be used for making a demo CD with and embedded server (Tomcat or Glassfish) and the application deployed to it. And having this CD sent to the client
3- It could be used for making an auto-update CD for an already deployed application (sending the application update on a CD to the client which all he has to do is to insert it into the CD-Rom and it would update the already deployed application).
Well, that is my initial thinking of its possible usage scenarios:
1- It could be used for installation CDs
2- It could be used for making a demo CD with and embedded server (Tomcat or Glassfish) and the application deployed to it. And having this CD sent to the client
3- It could be used for making an auto-update CD for an already deployed application (sending the application update on a CD to the client which all he has to do is to insert it into the CD-Rom and it would update the already deployed application).
Sunday, July 06, 2008
First time to Maven
Today, I was navigating Apache.org website. I ran into the Cocoon project. Out of curiosity, I opened it. I know the project 5 years ago and I thought that it was closed (obsolete). I don't know why I always had this thought in mind, but any way. I was really amazed that the project is still open and still has activities (latest as the time of this writing is: Cocoon 2.2.0 Released on 5/15/08
Any way, while reading the documentation (Your first Cocoon application using Maven 2); I ran across this link: Maven in 5 Minutes Which lead to this link: Maven installation instructions
It's been a while since I wanted to run maven and get used to it. So, I started downloading Maven 2.0.9 immediately and began the installation instructions.
After that I went back to the Maven in 5 Minutes which made me confused about two things:
1- In the "Creating a project" section, there is the following comment:
"If you have just installed Maven, it may take a while on the first run. This is because Maven is downloading the most recent artifacts (plugin jars and other files) into your local repository. You may also need to execute the command a couple of times before it succeeds. This is because the remote server may time out before your downloads are complete. Don't worry, there are ways to fix that."
2- I created the project any way, and continued to building it. Now although the previous mentioned comment, and although I find it very strange to go through downloading all these JARs in the creation phase, it started to download the JARs again to build the project..!!
I think that it should not have downloaded extra JARs in the first place, and I think that it should not have downloaded them again.
I did not try it; but I am afraid of having to download all the JARs every time I try to build the project.
I think that this is nonsense. If Maven is requiring these JARs, I think it should be available in the downloaded file itself, if not, it would be downloaded once and for all. Or may be, added by the user himself into the lib folder or something.
Any way,...
That was just a try. May be I would explore about this more or explore the documentation section later..
Now, I'll get back to the new Cocoon.. ;)
Any way, while reading the documentation (Your first Cocoon application using Maven 2); I ran across this link: Maven in 5 Minutes Which lead to this link: Maven installation instructions
It's been a while since I wanted to run maven and get used to it. So, I started downloading Maven 2.0.9 immediately and began the installation instructions.
After that I went back to the Maven in 5 Minutes which made me confused about two things:
1- In the "Creating a project" section, there is the following comment:
"If you have just installed Maven, it may take a while on the first run. This is because Maven is downloading the most recent artifacts (plugin jars and other files) into your local repository. You may also need to execute the command a couple of times before it succeeds. This is because the remote server may time out before your downloads are complete. Don't worry, there are ways to fix that."
2- I created the project any way, and continued to building it. Now although the previous mentioned comment, and although I find it very strange to go through downloading all these JARs in the creation phase, it started to download the JARs again to build the project..!!
I think that it should not have downloaded extra JARs in the first place, and I think that it should not have downloaded them again.
I did not try it; but I am afraid of having to download all the JARs every time I try to build the project.
I think that this is nonsense. If Maven is requiring these JARs, I think it should be available in the downloaded file itself, if not, it would be downloaded once and for all. Or may be, added by the user himself into the lib folder or something.
Any way,...
That was just a try. May be I would explore about this more or explore the documentation section later..
Now, I'll get back to the new Cocoon.. ;)
Wednesday, June 04, 2008
Eclipse IDE Introduction
The Eclipse IDE is a very rich and easy to use. But; as a senior developer who have been all the time in contact with, and sometimes giving courses to junior developers; I found out that with the following introduction about Eclipse, I help them to have a faster startup time. So, I thought of sharing this quick introduction of Eclipse IDE to everyone.
This introduction will not be including any screenshots of Eclipse.
But it will only introduce what is Eclipse, how is it organized, and how to look at it as a tool for helping us writing code.
Eclipse is an Integrated Development Environment (IDE) that contains a set of tools to help an application developer building his application.
How Eclipse is organized? To answer this question; let’s have a quick look at any Enterprise Java Application and what is its main components.
Any Enterprise Java Application (EAR); and let’s take it from the widest perspective; is an application that may contains some Web Applications (WARs), may contain some Enterprise Java Beans (EJB JARs) and may contain some utility JARs.
Also, the application, from the business point of view, may contain web application, some business logic, and a data model.
The data model could be Database or XMLs ruled by XSDs or DTDs, and could be both.
Of course, your EAR would require a server to run on. And of course the server will generate some output to the console.
Having all of these in mind, we find ourselves expecting to have too many tools to help developing such an application or simply, no tools at all. Eclipse IDE, provides too many default tools (plug-ins) that are downloaded together as a bundle and also supports adding more tools (plug-ins) to the downloaded bundle. You can even create your own.
Back to our question: How Eclipse is organized?
Now, as a developer, you would be having a task assigned to you. This task could be only related to JSPs and Servlets, or could only be related to EJBs. Eclipse IDE provides something that is called "Perspective".
The perspective is the way you are looking to your application at the moment. Are you looking at it from the web components side, EJB components side, or may be from the configurations side (XMLs and XSDs). Imagine the application as a car. You need to check something at the inside of the car; you would go to the inside-perspective. To check your car’s breaking lights; you would go to the rear-perspective. And so on.
For each side (perspective) you are looking to your application, you would find the common tools that are used for that perspective of the application. For web perspective, you will find the set of tools that are focusing on editing JSPs and Servlets and putting their configurations.
For the XML perspective, you would find the XML and XSD editors in hand providing you with a GUI for editing these files.
For the Java perspective, you would find the tools to inspect Java files and edit them. For the database perspective, you would find the tools needed to connect to a database and another tool for browsing the database tables. And another tool for writting and executing SQL statements.
For each perspective, you’ll find the right tools. These tools are called views. Some views are used for editing, some are used for only viewing properties, and some are used to view output.
Of course, for each perspective, the set of tools that appears are the default commonly used tools for that perspective. You can customize that perspective and add more tools (views) to your perspective and even you can customize your current perspective and save it for having it as one of the default perspectives for that workspace.
Well, that's it.
Looking at Eclipse this way, makes it much easier to use. At least that's what my colleagues told me.
This introduction will not be including any screenshots of Eclipse.
But it will only introduce what is Eclipse, how is it organized, and how to look at it as a tool for helping us writing code.
Eclipse is an Integrated Development Environment (IDE) that contains a set of tools to help an application developer building his application.
How Eclipse is organized? To answer this question; let’s have a quick look at any Enterprise Java Application and what is its main components.
Any Enterprise Java Application (EAR); and let’s take it from the widest perspective; is an application that may contains some Web Applications (WARs), may contain some Enterprise Java Beans (EJB JARs) and may contain some utility JARs.
Also, the application, from the business point of view, may contain web application, some business logic, and a data model.
The data model could be Database or XMLs ruled by XSDs or DTDs, and could be both.
Of course, your EAR would require a server to run on. And of course the server will generate some output to the console.
Having all of these in mind, we find ourselves expecting to have too many tools to help developing such an application or simply, no tools at all. Eclipse IDE, provides too many default tools (plug-ins) that are downloaded together as a bundle and also supports adding more tools (plug-ins) to the downloaded bundle. You can even create your own.
Back to our question: How Eclipse is organized?
Now, as a developer, you would be having a task assigned to you. This task could be only related to JSPs and Servlets, or could only be related to EJBs. Eclipse IDE provides something that is called "Perspective".
The perspective is the way you are looking to your application at the moment. Are you looking at it from the web components side, EJB components side, or may be from the configurations side (XMLs and XSDs). Imagine the application as a car. You need to check something at the inside of the car; you would go to the inside-perspective. To check your car’s breaking lights; you would go to the rear-perspective. And so on.
For each side (perspective) you are looking to your application, you would find the common tools that are used for that perspective of the application. For web perspective, you will find the set of tools that are focusing on editing JSPs and Servlets and putting their configurations.
For the XML perspective, you would find the XML and XSD editors in hand providing you with a GUI for editing these files.
For the Java perspective, you would find the tools to inspect Java files and edit them. For the database perspective, you would find the tools needed to connect to a database and another tool for browsing the database tables. And another tool for writting and executing SQL statements.
For each perspective, you’ll find the right tools. These tools are called views. Some views are used for editing, some are used for only viewing properties, and some are used to view output.
Of course, for each perspective, the set of tools that appears are the default commonly used tools for that perspective. You can customize that perspective and add more tools (views) to your perspective and even you can customize your current perspective and save it for having it as one of the default perspectives for that workspace.
Well, that's it.
Looking at Eclipse this way, makes it much easier to use. At least that's what my colleagues told me.
Tuesday, May 13, 2008
Dear Manager, can we develop an OSGi based application, please?
For quiet sometime now and I have been thinking of a new application framework. It's an application that I had in mind for quite sometime now. And it's the same application that my managers have in mind.
It's a big application that we are thinking of.
But I wanted to do it differently this time. Different than my managers think of it.
I did not want to have it as an application that is Struts , JSF or any known or unknown framework. I just wanted to make things different.
Yet, I do not like to create our own framework (like we did in one of our projects in the company).
The learning curve for internal frameworks are very high (usually) and the cost of having new members into the team is all the way up to the top of the curve.
So, the solution for such a big product, in my opinion, is to have it as simple as possible with one role:
"Stick to standards"
In this case, what ever project\product you have, you will always have only the cost of business related learning curve (if you have any).
Well, to solve this, in my opinion and according to the so much little I know about the standards out there, I only found Eclipse as a very good to what I had in mind.
1- 100% standard application.
2- Modular: very easy to run\remove plug-ins. Just drop the required JAR file in a specific folder, and restart Eclipse. WALLA.. It's working. The plug-in is loaded.
Well, for quiet sometime now, I was wondering how is it done.
I think today I got the answer, OSGi. I am not sure if I am correct or not, but at least that's what I think. If not, then what ever it was, I do not mind. But I will take the OSGi way.
Yes, that's it. That's how I will do my next application. OSGi bundles that are bundled according to the business units we have in the application. The more business units you would like to have, the more OSGi bundles you would create.
This way, you would very easily have the same application running with different functionalities according to the deployed bundles.
And still, you would have it according to the standards.
So, the learning curve is not that high. At least that's what I think.
I know that I am not the only one who thought of it this way.. :)
OSGi is there already. Eclipse is there already.. etc.
But the type of application I am talking about to be based on OSGi, that would be new thing.
Well, enough talking and back to work, may be I can convince my managers of having the new application the way I think, instead of the way they think.
And that would be the day.. ;)
It's a big application that we are thinking of.
But I wanted to do it differently this time. Different than my managers think of it.
I did not want to have it as an application that is Struts , JSF or any known or unknown framework. I just wanted to make things different.
Yet, I do not like to create our own framework (like we did in one of our projects in the company).
The learning curve for internal frameworks are very high (usually) and the cost of having new members into the team is all the way up to the top of the curve.
So, the solution for such a big product, in my opinion, is to have it as simple as possible with one role:
"Stick to standards"
In this case, what ever project\product you have, you will always have only the cost of business related learning curve (if you have any).
Well, to solve this, in my opinion and according to the so much little I know about the standards out there, I only found Eclipse as a very good to what I had in mind.
1- 100% standard application.
2- Modular: very easy to run\remove plug-ins. Just drop the required JAR file in a specific folder, and restart Eclipse. WALLA.. It's working. The plug-in is loaded.
Well, for quiet sometime now, I was wondering how is it done.
I think today I got the answer, OSGi. I am not sure if I am correct or not, but at least that's what I think. If not, then what ever it was, I do not mind. But I will take the OSGi way.
Yes, that's it. That's how I will do my next application. OSGi bundles that are bundled according to the business units we have in the application. The more business units you would like to have, the more OSGi bundles you would create.
This way, you would very easily have the same application running with different functionalities according to the deployed bundles.
And still, you would have it according to the standards.
So, the learning curve is not that high. At least that's what I think.
I know that I am not the only one who thought of it this way.. :)
OSGi is there already. Eclipse is there already.. etc.
But the type of application I am talking about to be based on OSGi, that would be new thing.
Well, enough talking and back to work, may be I can convince my managers of having the new application the way I think, instead of the way they think.
And that would be the day.. ;)
Saturday, August 25, 2007
javascript menu
Couple of months ago, we started a new project in the company I work for. Of course, the project needs a menu to navigate the system. This is something of the basics that you don't think of and mandatory to exist.
I was assigned to look for a menu. Well, I did and found couple of menus that really meets our requirements and the client's expectations. Well, almost.
Option number one was struts-menu. Which seemed to be the best option as we were already using struts in the project. So, I gave it a try. It does work just fine except for a very small thing. You have to do a click on the main menu items to get the menu displayed. No problem with that. But most of the menus now work with just mouse-over and mouse-out. Why the need for a click to pop up the menu and another click to make it go away?
The other thing we noticed at that time, is that the latest update was 2004 (I just double-checked now. This is not the case. The case is we were using older version, so of course, 2004 was the release date of that version).
Note: We are using Java EE 1.3 container. So, we had to use struts 1.3.7
Any way.
The other option was to go with a ready made java script menu. We found the Tigra menu. That was a very good option actually. The menu is fantastic actually.
But with just simple four problems (:D):
1- It's java script code is scrambled (I just discovered today that we were using the compressed version of the menu.js file).
2- The menu items are not displayed over a combo box in IE 6 only!!!!!! (IE 7 and FireFox are displaying it right). And you cannot overcome this issue by setting the z-index to a higher value. They say that this issue is fixed in the golden version. But the fix they made, I really think is not a fix, it's just a work around. They hide the form elements that gets displayed under the menu....!!!!??! (At least that's what I understood, I might have got that wrong).
3- It is using absolute position, which leads to having rendering issues specially with window resize.
4- Barely can be modified for Arabic usage (right to left display).
So, actually, I had enough of this menu issue. We have been trying different menus for the last couple of months now and still have not reached a solution of a menu that works without any cross-browsers issues. For each menu, we have different issue either for all browsers or for a specific browser.
So, I decided to give it a try. All menus are just doing some onmouseover and onmouseout java script calls. So why not making it simple HTML nested tables?
I tried it and it worked for all browsers displaying the same. And you can very easily apply what ever style sheet you want on each menu item seperatly. I made it in just in one day with its custom tag that loads its items from an external XML file. And it really renders just fine on all browsers.
Well that's what I thought till last Thursday...!!!!
It cannot display its items over combo boxes...!!!!
I'm really disappointed. :( :'(
I was assigned to look for a menu. Well, I did and found couple of menus that really meets our requirements and the client's expectations. Well, almost.
Option number one was struts-menu. Which seemed to be the best option as we were already using struts in the project. So, I gave it a try. It does work just fine except for a very small thing. You have to do a click on the main menu items to get the menu displayed. No problem with that. But most of the menus now work with just mouse-over and mouse-out. Why the need for a click to pop up the menu and another click to make it go away?
The other thing we noticed at that time, is that the latest update was 2004 (I just double-checked now. This is not the case. The case is we were using older version, so of course, 2004 was the release date of that version).
Note: We are using Java EE 1.3 container. So, we had to use struts 1.3.7
Any way.
The other option was to go with a ready made java script menu. We found the Tigra menu. That was a very good option actually. The menu is fantastic actually.
But with just simple four problems (:D):
1- It's java script code is scrambled (I just discovered today that we were using the compressed version of the menu.js file).
2- The menu items are not displayed over a combo box in IE 6 only!!!!!! (IE 7 and FireFox are displaying it right). And you cannot overcome this issue by setting the z-index to a higher value. They say that this issue is fixed in the golden version. But the fix they made, I really think is not a fix, it's just a work around. They hide the form elements that gets displayed under the menu....!!!!??! (At least that's what I understood, I might have got that wrong).
3- It is using absolute position, which leads to having rendering issues specially with window resize.
4- Barely can be modified for Arabic usage (right to left display).
So, actually, I had enough of this menu issue. We have been trying different menus for the last couple of months now and still have not reached a solution of a menu that works without any cross-browsers issues. For each menu, we have different issue either for all browsers or for a specific browser.
So, I decided to give it a try. All menus are just doing some onmouseover and onmouseout java script calls. So why not making it simple HTML nested tables?
I tried it and it worked for all browsers displaying the same. And you can very easily apply what ever style sheet you want on each menu item seperatly. I made it in just in one day with its custom tag that loads its items from an external XML file. And it really renders just fine on all browsers.
Well that's what I thought till last Thursday...!!!!
It cannot display its items over combo boxes...!!!!
I'm really disappointed. :( :'(
Thursday, August 16, 2007
JDK 7 - Looking ahead
I have read today the following article at Sun. And you can vote yourself with what you think is better to be added right here.
For me, I am not sure if adding new major language changes to Java is a pretty good idea or not. But a general idea is that I totally agree with one of the replies who specifically said:"The reason of success for Java was that it was a simple language that can easily be kept in mind, but was powerful enough to get most jobs done.".
Any way, this is what I think in details:
For me, I am not sure if adding new major language changes to Java is a pretty good idea or not. But a general idea is that I totally agree with one of the replies who specifically said:"The reason of success for Java was that it was a simple language that can easily be kept in mind, but was powerful enough to get most jobs done.".
Any way, this is what I think in details:
- Language-level XML support : why adding new features that would tide the language to something else other than Java (like we did with Java and Expression Language (EL)). IMHO, I think the way Java community did with the Scripting project (JSR 223) is a much better way of using other things than Java inside Java. It makes it very easy to use, and still have a very high way of abstraction and isolation of dependencies between Java and others, even if it was XML. The reason why I am saying this is because to add XML support you will need to add support for a lot of XML-related technologies. We do have some of them already in the JDK XML packages and classes implementations. But why add them to the Java syntax.
- Closures : I am not sure what closures are. But when I read about it, the first impression I had is that its syntax is complicated.
- Block constructs : don't know.
- Strings in switch statements : Yes. I think it is a very useful feature.
- Language support for
BigDecimal :I am not sure what is the feature in this. - Java property support : I have read a long article discussing this feature right here. And to tell you the truth, my final conclusion is that IT WILL depend actually on how they propose it. I find it very useful, but it really needs to be easy to use.
- Lightweight method references: Not sure what is the meaning of this.
- Extensions to the annotation mechanisms: Yes (if it means annotations inheritance).
Sunday, August 05, 2007
Finally, struts 1.3.8 is up in the project
Well, it has been a while since I had the time to do anything but work.
Today, I am almost finished with my task that I have been working on for the last couple of weeks. The task is, in general, to work with struts framework inside the framework we are using. Any way, I have learned alot of struts in this task.
I will post a briefe How-To about struts.
But to tell you the truth, struts documentation online really needs to be more explainatory than the current documentation. I find it too briefe to be understandable.
I was working on Struts 1.3.8
Well, till next time with the struts discussion.
Today, I am almost finished with my task that I have been working on for the last couple of weeks. The task is, in general, to work with struts framework inside the framework we are using. Any way, I have learned alot of struts in this task.
I will post a briefe How-To about struts.
But to tell you the truth, struts documentation online really needs to be more explainatory than the current documentation. I find it too briefe to be understandable.
I was working on Struts 1.3.8
Well, till next time with the struts discussion.
Saturday, June 30, 2007
Java Passion
Few months ago, I ran into this web site.
It's a free Jva online courses. I think the auther of these course is
giving something that really few would appreciate.
It's a free Jva online courses. I think the auther of these course is
giving something that really few would appreciate.
Thanks to Sang Shin.
Thursday, June 28, 2007
3D Java-based Desktop
I am not sure why do people think that Microsoft has made a new jump in the desktop world by adding a 3D feature to some elements in its new Windows.
Sun has made its own project for 3D desktop few years ago (3D java-based Desktop). The project is still in progress (beta version), but I think it is cool thing.
The only problem for windows users, is that only a demo version is available (Windows does not separate the shell from the OS, as Unix-based operating systems do).
The project name is: Project Looking Glass.
Sun has made its own project for 3D desktop few years ago (3D java-based Desktop). The project is still in progress (beta version), but I think it is cool thing.
The only problem for windows users, is that only a demo version is available (Windows does not separate the shell from the OS, as Unix-based operating systems do).
The project name is: Project Looking Glass.
Subscribe to:
Comments (Atom)