Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

2006/12/05

Data Access + Simplicity = iBatis (power)






Complexity is not always the best option, actually keeping things simple can help you to boost your application and make more extensible and able to go over the limits.
This is iBatis aproach.

What is iBatis?
iBatis is a data access framework for Java, .Net and Ruby.
iBatis has two parts that can work separely: iBatis DataMapper and iBatis Data Access Objects.
iBatis is one of the Apache projects and is actually used in the JPetShopStore.

iBatis Data Mapper
The Data Mapper will let you create the access to the database whitout writing having to write a single line of JDBC or ADO.Net code, you will instead use iBatis and write XML's to match your database with your objects using SQL. This gives a great flexibility and simplicity.

iBatis Data Access Objects
This framework give you a layer to hide the details of how you are handling the persistence in your program.


Image from iBatis site.

Abator
Abator is the code generator for iBatis. It can generate the XML's and clases for you based on your database.

You can use both Data Mapper and Data Access Objects together or separly
We all know that once the project gets more complicated sometimes doing some complex tasks with complicated technologies or aproach it actually takes more time to resolve the problem that it should be. With this aproach you can actually keep a good architecture with simplicity and able to extend and there is only a short learning curve.

I will add some tutorials in future days, I'll probably start with .Net (because there are too few tutorials about it in .Net yet) and perhaps Ruby or ColdFusion (using Java) after that.

Resources:
iBatis: http://ibatis.apache.org
Abator: http://ibatis.apache.org/abator.html

Best regards,
Feto

2006/11/29

Need multiple sites on IIS under windows XP?






If you use windows XP and you need to have several sites under IIS, then you are in the same situation that I'm, but I found a solution and I want to share it with you.

The IIS under windows has some limitations because is supose that XP is not a server OS, just a workstation OS.
Because of this the biggest limitation is that you "can't create sites".
Well, let me tell you that this is not actually true, the IIS console doesn't have an option to create sites, but you do can create them, the only real limitation is that you can't have more than one site running on the same time.
Here I bring to you two free tools to create and manage sites in IIS under windows XP.
This tool has being a great help for me and I know it will be a great help to you too.

XP PRO IIS Admin
http://www.jetstat.com/iisadmin/

IIsAdmin.Net
http://www.codeproject.com/csharp/IIsAdminNet.asp

Both tools will allow you to create sites, switch between the sites, start, stop them, restar IIS and some other features.

Take a look at them, are really good and simple tools.

Best regards,
Feto

2006/11/20

.. that could be better implemented!






Refactoring...

Things can always made better, there is no perfect code, you can always improve your code and applications.
But, how? The code is already there, but you need to change it so it may support an additional feature that you must add now.
Well, as many of us has fall into this situation, somebody created refactorings.

What is refactoring?
"Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior." Martin Fowler, refactoring.com
This means you can change or improve your code, causing the least impact possible and improving your code.

How can I do a refactoring?
Well, here I have a site by Martin Fowler where you will find books, links, tools and a catalog... yes, a refactoring catalog!
Site: http://www.refactoring.com/
Catalog: http://www.refactoring.com/catalog/index.html
This catalog is a book of recipes for specific situations, in an easy way it will tell you how to do the refactoring you need.

I hope this help you a lot.

Best regards,
Feto