This year my enterprise is growing very fast and a lot of new software requests are coming every month. Unfortunately we couldn’t get new employees, we’re a small company, so we looked around for something that could speed up the development process. This month i found a very interesting .net library, DevExpress XPO.
This library is something fantastic, with it you can have a total abstraction from the database layer of your applications so you don’t have to write a single row of code to add, modify, delete records from databases!
The only thing to do is a good Object Orientet Programming analysis for your application but i thing that everyone using .Net is familiar with it
All you have to do is:
- Provide the connection string to a database (if you don’t provide it XPO will create an ACCESS .MDB database as default)
- Design your classes inheriting from XPObject class
- Call the Save, Delete method of your new class to store or delete data, it’s done!!!
- Querying is really simple, i’ll show you later
An example:
public class User _
inherits XPObject
public Name as string
public Surname as string
public Phone as string
end class
In your program you just have to:
dim newUser as new User
newUser.Name=”John”
newUser.Surname=”Smith”
newUser.Save()
DONE!
Querying records:
If we want the full Users list we just need to do this:
dim Users as new XPCollection(Of User)
for each usr as User in Users
MessageBox.Show(usr.Name + ” ” + usr.Surname)
next
If you want to delete the 4th user you can just call Users(3).Delete() and it’s done (index starts from ZERO)
More complex queryes can be done using a Criteria, it’s long to explain you can find complete infos on www.devexpress.com
Personal experience
I bought Devexpress XPO last week so i have to be considered a newbie but it’s so easy that i finished a complete software in four days. My customer paid me so i can say i made a great choice, i spent 180$ and i earned 3500$ in few days. Without XPO my project progress would have been about 20%.
Great choice, i suggest it to everyone that needs TIME! Consider that you’ll be able to deliver 3 projects in the time you needed to deliver just 1.
Last consideration
Last but not less important thing i forgot is that if you use XPO you can change the database platform without writing a single row of code. XPO creates databases, tables, records everything database related!!!
Supported DB Engines
- SQL Server
- Access
- MySQL
- Oracle
- PostgreSQL
- Firebird
- PervasiveSQL
- VistaDB
- SQL Anywhere
- Advantage
- DB2
- Sybase
In each moment you can decide to make a different DB Engine version of your software just changing the connection string, no other rows of code needs to be touched!!!
