DataMgr 2.5 is Gold!
One would be forgiven if they mistook DataMgr for abandoned software. After all, I announced work on DataMgr 2.5 back in August of 2009 and come February (now March) of 2013 and still no official release of 2.5 and no word since DataMgr 2.5 Beta 3 was released more than a year ago. Well, that changes here.
DataMgr 2.5 is Gold!
It has taken so long mostly I have been busy (enough to need to hire ColdFusion developers - which I still need).
DataMgr 2.5 has been quite stable for some time and I just haven't gotten around to releasing it. My friend, John Whish, (author of the book "ColdFusion ORM") is giving a presentation about DALs (Data Access Layers) including DataMgr and ColdFusion ORM later this week (more about that soon) and that gave me the extra motivation to go ahead and release the thing.
What is DataMgr?
If you aren't familiar with DataMgr, feel free to check out the What is DataMgr page of my DataMgr documentation.
Better yet, attend John's free presentation. I believe he gives a better overview for a smaller investment of time than I do and his opinion is a little less biased than my own.
From CRUD to DAL and ORM in ColdFusion (March 6, 1:00 PM EST)
This will cover both DataMgr and ColdFusion ORM and give some ideas as to their comparative strengths and weaknesses.
It costs nothing but an hour of your time, so if you have any interesting in learning about about DataMgr and/or ColdFusion ORM then you should really attend.
A special thanks to TeraTech (organizers of the long-running CFUnited conference) for organizing this presentation.
What's New in 2.5
If you are familiar with DataMgr, below is what is new in DataMgr 2.5 (since DataMgr 2.2).
Before reading it, note one thing that has been true of every single release of DataMgr since 1.0: the vast majority of code using DataMgr can upgrade without any change at all. That is still true of this release.
- Filters (and named filters)
- Paging (via an "offset" argument in the getRecords method)
- Paging handling in the database: MS SQL 2005 +, MySQL, Oracle, PostGreSQL
- For all others, the query is sliced in ColdFusion
- Support for managing Indexes
- Optional "fieldlist" argument to limit the data that can be changed while saving data.
- Optional "truncate" argument to automatically truncate data to fit in database while saving data.
- For tables with a simple (single-field) primary keys, the ability to pass a single value into the "data" argument for getRecords() instead of a structure of values.
- New Methods:
- "hasRecords" method for efficient checking of existence of records matching criteria.
- "numRecords" method to see how many records matching criteria.
- New methods to return SQL used internally: getSelectSQL, getFromSQL, getWhereSQL, insertRecordsSQL, updateRecordsSQL. This is very useful with CF_DMQuery.
- Ability to extend DataMgr
- Ability to migrate fields - moving old data to new field names. Handy for renaming fields or easy migration from many-to-one relationship to a many-to-many one.
- Ability to introspect database tables.
- New "ftable" attribute.
- Major performance improvements for loadXml() (many for all database, some specific to SQL Server)
- New "isDeletable" calculated field available to "getRecords" determines if each record can be deleted based on "onDelete" property of relation fields.
- Ability to exclude columns from multi-row get queries (see useInMultiRecordsets).
- "advsql" argument now available for update methods
- Defaults for init() "datasource" argument:
- Application.datasource, if defined
- empty string (simulated database), otherwise
- Special Date Type setting
- Special="UUID": Set the value of the field to a UUID if no value is passed in on an insert.
- SQL Server: Added support for varchar(max) (and made it the default for LONGVARCHAR).
- New "applyListRelations" method (take tablename,query) for post-calculation of list relations for getRecords() - also useful with CF_DMQuery
- Optional "XmlData" argument to "init" method (calls "loadXml" automatically)
- Ability to check for table existence.
- Improved MS Word cleanup
- Fixed error on ColdFusion 9.0.1
- Better handling of CFML Engine peculiarities
- getDatabaseXml() now always accurately reports just the database schema.
- Relation fields that use themselves now error instead of producing an infinite loop.
- "maxrows" argument now works in Derby
- Some small MS SQL specific improvements
- Several small fixes
DataMgr is open source and free for any use. You can download it from RIAForge.
The docs for DataMgr show compatibility with ACF through version 8. Is the DataMgr 2.5 compatible with ACF9 or ACF10?
Good question. I use it on CF9 pretty frequently. I am pretty sure it works on CF10 as well, but I haven't tried myself yet.
If anyone has trouble running it on CF10, let me know and I will work to get it running there.
i do not know if you're still working on the project; anyway i think it should useful to have methods for returning objects type other than query.
I'd like to have or a getrecords in wich i can choose the return type (for example an array, json, structure) or simply a different method for each of the return type.
I know it's simple to do conversions after calling the method but it should be fine i think to have it in DataMgr.
Steve - thanks for making this product. I've looked at it a few times and thought about what I would need to do to in order to make it work within a hodge-podge of other CF stuff - probably not worth the effort. I will re-evaluate if there is something to do that involves a new thinking about data access.