h1

Of Best Laid Plans of Mice and Men

June 21, 2009

I was thinking (as I do often) this morning about how the economy is effecting larger corporations, and as a side effect if it can be a benefit to smaller businesses and startups. Let me explain my thoughts

For the longest time my thought was that If I had invested into developing some product I would be concerned that some larger company with a larger bank roll could come in and build something and basically crush the market place for my product. I know cynical, but it has happened before to many small companies throughout history. However as we can see from what’s going on in the marketplace larger companies are starting to shutter business units that are not profitable. Put into perspective what is non-profitable to one company could be an excellent business for another. As an example if (I suspect) a business unit in MS is selling 10 million dollars in revenue of product X, this could be deemed as a non-essential business and be closed. However if a smaller 5-10 man shop sells 10 million dollars in revenue, this would be a great success.

The one problem I see with today’s software development industry is IP law when it comes to Patents. Fundamentally it is flawed in my opinion as the current system stifles innovation. You have heard this before but with the largess of patents issues and the quality of such patents being suspect you can understand how this system has become a runaway train. Think of it this way, I suspect throughout boardrooms, offices, kitchens and bars where ideas are conceived,  thought of what the legal complications will be to bring a product to market are hindering the development of new ideas and technologies. Smaller companies without the resources to go into battle with the larger patent trolls are crushed in a legal system, and those pressure resources are consumed buy nothing but destructive waists of time.

For example, the fact that there is a patent, any patent on XML seems ludicrous. XML is a text format that has well, text in it. Requesting and getting a patent on what is stored in there is nonsense. It was created to store any formatted text that crosses domains. If that data is uses as a database for one application, patient record information, or RPC data really should not matter as that is what it was created for. Though many apply for a patent to store their CRM data in XML, or Form Schema, or ….

I do not want to go into the companies just setup for Patent ownership and litigation,  but honestly that is a business that is not in the system for creation or innovation, but disruption.

h1

Update

June 16, 2009

Its been a little while since my last blog and when life gets really busy the blog is the first casualty. When I started this year I had some high hopes to dig into some of the newer technologies and build so (IMHO) cool things. Technologies such as WPF as Silverlight, maybe jump into a new Language like F# and even give a try at some IPhone development. Though I have read business has kept be pretty much focused on SalesLogix web development and I have not been able to dig in to that meaty technical dinner like I would have wanted. I cannot complain about being busy at work but sometimes its nice to work in some of the newer stuff. It looks like the rest of the summer is going to be more of the same, except that I have started to take off some weekends to get some nice R&R especially while we have sun up here in Ontario.  I am looking towards the fall, and I suspect a new release of VS2010 to start to get myself into some new stuff. I have lots of ideas, I just need to work out the timing to get them to come to life.

I am still very much excited about Silverlight (with 3.0 coming) and I have been trying to get into a Class on WPF that has been cancelled more times then I want to remember. It seems that training budgets are being slashed all over the place and that is in itself putting pressure on the smaller guys given that the only training that can be had is onsite which as you can imagine is not cost friendly.

I also want to give a shout out to the guys at Telerik. I have done a project with them and they have a great group of people and their controls are fantastic. If you are looking into any 3rd party controls I am sure that they have something that will be just right for you.

So for now training remains as it has in the past, reading, browsing and building.

Have a great day

- Mark

h1

Driving to Insights

May 8, 2009

I have been waffling between flying and driving to Insights this weekend. The final ‘Nail’ to get me into the desire to drive was when I did the hour budget. That is the time to Drive Vs. Fly and and add on comfort in the equation. When it looked as if either going or returning would have a 8 hour investment with flight heading down and 9 hour returning. With the estimates of driving being just a little over 11 it seemed like the right thing. And with the new car should be a nice ride. I have downloaded hours of content to listen as well as lots of music so I suspect the time will go by quite fast. I am hoping to actually get to the hotel tomorrow night as I have checked for availability and everything is good to go. Now to just get the my ducks in a row and packing done and off I go.

See you all there soon.

h1

Unwrap that object my friend

May 5, 2009

Lately I have been seeing posts with regards to filtered searching inside of the SalesLogix web client. An example is the contact list where functionality is required to display only the contacts with a certain last name. I had to do this recently and had found the same issues that had been reported in the forums and newsgroups. The problem identified that properties in child entities were not resolvable when bound to a grid. After some head scratching, and inspection using visual studio debugger I noticed that the children were not being resolved (lazy loading) so I wrote a simple method to explicitly unwrap the entity to ensure that the children are resolved.

The simple helper method is as follows

static Sage.SalesLogix.Orm.EntityBase Unwrap(Sage.SalesLogix.Orm.EntityBase value)
{
   INHibernateProxy proxy = value as INHibernateProxy;

   if (proxy != null)
   {
      value = (Sage.SalesLogix.Orm.EntityBase)
           proxy.HibernateLazyInitializer.GetImplementation();
   }

   return value;
}
Now I will finally iterate through the resultant list in my query and add the result of this method call to a new list and finally return this new list instead of the one that was directly returned from the query.

var list = (IList)queryExecutor.List<IContact>(); // Gets the list from NHibernate

// New resultant list

IList result = new List<IContact>(); 

 

// Unwrap the entities and add to the new list

foreach (IContact contact in list)

{

   result.Add(Unwrap((Sage.SalesLogix.Orm.EntityBase)contact));

}

return result;

 

– Mark

h1

A week till Insights

May 4, 2009

Next week the Insights business conference is on in Nashville. This is a time where I get to meet up with all my business partner friends and see the great people from Sage. Though I talk to many of them daily meeting up face to face, and having some social time is a great thing to do. I expect that the conference will be somewhat lighter in attendance this year in light of the economic downturn, and the unfortunate spread of the Flu of late. This will I expect equate to those who are going, to more quality one-on-one time with other BPs and with their Sage counterparts. I am hoping for a real ‘Geek’ out while there, having dinner with some of the trainers, and PSG guys and SE’s. I believe it is going to be a great time and I definitely look forward to seeing everyone there.

h1

Custom SmartParts

April 30, 2009

Posted on slxdeveloper.com was a question on how to create custom smart parts for SalesLogix Web Client. Now I like custom smart parts, so much so that I find myself eventually going there quite often. You might say this is counter intuitive as you should just ‘Set it and forget it’ with the OTB form editor and data binding capabilities. This is where I somewhat deviate on that thought process. I find that the forms editor makes for me anyways a great prototype starting point where you can get the UI set up just so. But after its setup I find myself happily in Visual Studio making edits to clean up the generated code or have the smart part inherit some further base class to provide a deeper level of functionality.

I will continue happily work in both environments and really focus on getting the work done for the customer.

h1

The Cobblers Shoes

April 27, 2009

The other day I was pointing out my Corporate web site to a person I was having a conversation with. When looking at this site I was completely embarrassed being a developer and focusing on quality. This site I whipped together on a Sunday afternoon to give my company a presence. This was done more then a year ago and I have been vowing to update the site and do it ‘Right’. The time is coming up to put in the time and effort to get it up to date using the corporate branding and technologies that we use here day to day. I have decided to go down the path of ASP.net MVC for the core page handling technology for the update and hope to create a more interactive site that will contain more ‘good’ bits including downloads and development papers. This of course will take some time as I must continue to focus on client engagements, but I would definitely like to get a first pass up before Insights in Nashville, April 10th. The state of the website reminds me of the quote of the Cobblers shoes, where the worst shoes belongs to the cobbler who has the talent and capability to fix his own shoes. I hope through the next few months that I will feel more proud of the web site then I do now.

Mark

h1

Successful Developer

April 23, 2009

Rich Eaton who works for Sage in the PSG group has started blogging. You can find his blog here. Rich’s most recent post is about what it would take to be a successful web developer and he will be providing some insight at ‘Insights’ on the attributes of running a successful web dev based consultancy. Rich and I have talks from time to time and he is a really nice guy with some good insight into things. Its worth adding him to your blog list.

With regards to his latest post, its easy to understand the tangibles. The checklist of capabilities one must have.. CSharp .. Check, ASP.net … Check, JavaScript … Check …however I believe there are additional traits you need to ensure that you are successful.

The capability to Gut, Prune and Discover

Lightly put much of what we do now is ‘Groking’ new tech. This will change over time as the platforms change but the pure nature is to dig deep into the guts of things and understand how to accomplish the given task. Those who are truly long term will have a desire to get in a break things apart to see how they work. As you can imagine this information is invaluable for delivering end solutions build on the web platform

A Community Spirit

There is small number of Developers that are working on the Web Platform and of them a portion know it really well. As Rich mentioned there are places to obtain information such as Sage Training, Slx Developer, and Google. I really believe to build up the developer community for the web platform we will need to be even more community focused. I believe in the Past there may have been a fairly insular approach to knowledge sharing. I hope that is a thing of the past though I do believe that there are still those partners that take without contribution.

Energy, and flexibility

Honestly taking on the web platform can take some real investment in time and effort. This is not the old way of doing things. There are new practices, procedures and Technologies that will take time. There can be days as a developer that you will walk away and think I Just do not get it, but with time it will start to piece together nicely. In regards to flexibility, I think it is easy to fall into the trap of trying to code something in the way we did it in the past. Such as data access in the Lan vs. NHibernate in the web. We have to be open to the new ways, but and I say this with a big BUT we also have to be able to make decisions on the right tech for the implementation at hand.

Do not be afraid to Ask, but …

This is a journey that all of us must take if we want to develop for the web. Its ok to ask for help in the various forums. If someone is nice enough to help, say thank you, and maybe even make a comment on their blog, or on the forum. Also understand that (I suspect) that most help will come in the form of direction/details on how to resolve the issue yourself. Do not expect full coded examples as very few have time to come up with working code (unless they already have one)

I tend to read a lot, usually when I am done working for the day and I head to watch some TV. I generally have a book in my hand. I think the single biggest trait of a successful developer is the desire to learn.

h1

Customer Portal

April 22, 2009

I am Working on a Customer Portal project and I was seeing some strange behavior. When ever I opened up a Lookup control a JavaScript  error was thrown and the resulting data was not being displayed. However after CTRL+F5 on the page the values would then show up. After discussing the problem and looking at the issues inside of Firebug to see that there was no named query available for the results to be generated. I was then pointed to the right place where the customer portal service list did not contain 2 very important entries.

So in a nutshell, ensure that in the customer portal the following 2 services are registered:

#1

Service: Sage.Platform.NamedQueries.DictionaryBasedNamedQueryCacheService, Sage.Platform

Registered As: Sage.Platform.NamedQueries.INamedQueryCacheService, Sage.Platform

#2

Service: Sage.Platform.NamedQueries.DictionaryBasedNamedQueryCacheService, Sage.Platform

Registered As: Sage.Platform.NamedQueries.INamedQueryLookupService, Sage.Platform

 

Once the entries were added all of the lookups in customer portal worked as expected.

Mark

h1

The Sprit, my Thoughts

April 16, 2009

Loved the movie Sin City, so I thought I would watch the Spirit yesterday night. I really thought that this movie was  a waist of valuable time. Really stupid dialog, really stupid story and it looked as if it was trying to rely on the effects that for me were flat.

On a another note, while developing some smart parts in SalesLogix web there comes a time that the part has to become custom. That is the level of functionality exceeds the capability of the designers and/or the it serves better to work on the control in visual studio (my favorite environment). When the part is generated inside of AA an interface is created that represents the UI. When you convert it to a smart part you are effectively taking it out of the generation process and this interface will never be created. So when the site is deployed, if you do not clean the reference code in your smart part you will get a compile error when the page is accessed.

I also have gotten into the pattern of splitting out the code from the ascx file so that I can work on them as separate items. So when I convert a smartpart to custom (assuming I create it in AA first) I do the following steps.

1. Deploy and load the site into VS

2. Split the smart part to the Markup and Code files (add a new file with the same name smartpart.ascx.cs)

When this happens VS will ask me if I would like to put the code in the App_Code folder. Say no so that the file stays with the markup file.

3. Cleanup the markup (its not pretty in there).

I take a moment to cleanup and property indent the markup. This makes it easier for editing at a later date.

4. Make the coding changes required

I will make the changes required, including any refactoring required to simplify the smart part. I will also determine usage of the functionality inside and decide if some of the code should be promoted to common library

5. Test

Since I am in VS, I do both a build to determine any compile time errors and a run through the the functionality. This ensures that before I add it back to the support files for the portal its working as expect

6. Add as a support file(s)

I always work off a filebased VFS which has an extra benefit. I can basically just copy the changed files into the model in the appropriate directory location. This saves me from going to AA and doing the Add Folder … Add File steps which can take quite a long time.

Make sure to add the markup file (ascx), the code file and if available the App_LocalResource file as well.

7. Remove the smart part from the entity model

Once the support files  have been added, I go to the entity model and locate the smart part that I started with and delete it. This ensures that it does not get deployed instead of my new updated custom smart part.

That’s it for now. Hope the steps help someone.

Mark