I’ve just updated the CF License Calculator to include the various flavours of BlueDragon as well as moving it to it’s new permanent home here rather than a single blog entry.
I’m no Flex developer but working in an office full of Flex developers is sometimes handy. So with the confusion of the EULA changes in ColdFusion I thought I’d whip up a quick (very) Flex app which makes things easy for you to calculate the number of boxes you need to buy.
DISCLAIMER: This is mean as indicative only, you should consult with your Adobe rep to ensure you are running within EULA terms.
NOTE: CPU count is based on PHYSICAL processors not the core count.
NOTE: The calculator has now moved here
A typical question from a client arose, “who’s using CF in the UK?” so a quick Google search using the filetype operator to get a rough idea, revealed some interesting results. It was only a ‘rough’ search so don’t start commenting about the ones hiding the cfm extension etc.
I think by far my favourite CF powered site is ReaderSheds.co.uk!!!
so here’s the full text of the new ColdFusion 8.0.1 EULA;
…in the event that Licensee uses Virtual Machines with respect to the Software, (a) with respect to the Standard version of the Software only, notwithstanding anything to the contrary in this Agreement, the number of 2 CPU licenses required shall be based on the greater of (A) the number of available physical CPUs for all instances of the software divided by two (2) (any fractions shall be rounded up for purposes of this provision), or (B) the number of total Virtual Machines on all Computers on which the Software is installed, and (b) with respect to the Enterprise version of the Software only, notwithstanding anything to the contrary in this Agreement, the number of 2 CPU licenses required shall be based solely on the number of physical CPUs on which the Software operates divided by two (2).
So what’s changed? Ok, so we now no longer have do the previously required multiplication - see this post here for previous analysis. Now we’re licensed on the GREATER number of either physical processors divided by 2 or the number of VMs the software is INSTALLED. Notice the word INSTALLED, this differs to the enterprise version which says ‘on which the Software operates’. So with Enterprise, if i have the software installed but it’s not running I don’t need a license - perfect for clusters and Amazon EC2 stuff. Great to see that they’ve listened to the community.
I thought it’s been a while since i posted a proper code blog entry, so here’s one. It’s based on how i handle updating a database when multiple values for checkboxes have been posted, the same applies for multiple selections too from a drop down box.
First off, let’s simplify things. Imagine if you will, three tables, users, groups and users_to_groups. - pretty standard type stuff with the users_to_groups table allowing a many to many relationship between the users and the groups.
So when we want to assign a user to a group we add a new row to the users_to_groups table with the userid and groupid for each group we’re adding the user to. This is based on say, the following form submission;
Various code I’ve seen before handles this by taking the list of groupid’s and looping over it and doing an insert each for each item - usually having purged existing assignments beforehand, for example;
Now having worked for a large company with a team of DBA ninja’s - where possible we left the DB do as much processing as possible and this is one such case where our logic was wrapped up into a stored procedure.
So what do we have, a userID and a list of groupIDs that we want assigned to the user. I’m not going to look at the stored procedure, but my SQL is pretty simple;
I’m using a nested select statement in my insert statement. The nested select statement is selecting the userID that we passed into it and a column named item (aliased to groupid) into a sql (2000/2005) function udf_List2Table() - this as you’d expect, takes a list of values and converts it into a table on the fly. The code for the sql function can be found here - NOTE: I didn’t write this function.
I much prefer this method to looping over a list and performing an insert each time - keeping it all in SQL just seems so much cleaner. This logic can then be wrapped up inside a CFC or in this case a stored procedure which can then also handle the delete processing too before the inserts. Obviously, as is often the case implementations of DB functions vary across different servers but I’m pretty sure almost all the current servers have some form of custom functions so this behaviour can be duplicated there.
Another argument is that using RDBMS specific SQL, eg functions, stored procedures, views etc makes your app none portable between between the different DB servers - this usually only comes into play when you plan on distributing an application - but if it’s more performant to have the RDBMS handle this type of stuff then are these applications sacrificing performance for their own ease of maintenance of the underlying CF code?
A while back I blogged about my disappointment with CF8 licensing in virtual machines - my post got a fair amount of attention, i’ll leave you to read it for yourself here but it sounds like a change could be coming!
I haven’t blogged this yet (having known about it for ages) but these last few days before Christmas will be my last days at The Berkeley Group and after the New Year I will be joining Nik, Adrian, Ade, Josh & others over at Monochrome - so like most I’m crunching through all the Flex resources I can find and really looking forward to moving to pastures new. Nik even put a clause in my contract to present at CFUGs and conferences so i’ll be back presenting again after a few years abscence.
A question arose in the Adobe ColdFusion forums as to whether or not CF8 supported named attributes (dbvarname) with CFPROCPARAM. There’s been a little confusion regarding using named parameters since CF5 supported them, CF6 dropped them, CF7 didn’t include them but then hotfix 7.0.2 added support for them which was then updated 1 day later with support removed.
CF8, now using JDBC 3.0 had initial support for dbvarname in early betas but then was removed in the final release. However, you still see occasional suggestions that dbvarname may be still support, indeed - if you’ve seen any of Charlie Areharts CF8 Hidden Gems presentation he has it listed and the odd code sample that pop up in the ether eludes to it being supported so i thought I’d try it out for my self…
So, i took a really simple SP call and started playing with it;
and then modified it to use dbvarname attributes as per samples floating around…
sure enough it worked - but that’s not a real test since the procparams are still in the same order as the SP parameters - sure enough, changing them around caused the SP call to break!
So in conclusion it appears that named parameters with stored procedure calls on CF8 IS NOT SUPPORTED!
After Sean learnt something earlier this week it was my turn. After playing around for the first time with the Eclipse CF Wizards I was looking at some of the code it generated in particular the CFCs. In some of the gateways i saw stuff like returntype=”myapp.somebean[]” - I’d never seen this syntax before and had always used a returntype of array but turns out i’ve been missing a treat for returning an array of objects of a certain type!
Note to self - when using xmlsearch() to search xml packets (in this case the response of using http://maps.google.com/maps/geo) which is returned with a namespace defined as;
the xmlsearch() would need to include a colon (:),eg
Omitting the colon returns no results when a search is performed. It’s not a CF bug as Steve Erat points out.
Recent Comments