SalesLogix .Net Extension Grief

Today I have been busy away working on some .net extension code. The integration code is fairly simple and does not lead to any kind of complexity that would have manifested in any issues. The code had been working during compiles and applies into my SalesLogix instance. Then all of a sudden it just stopped working. It seemed very odd to me that it would have stopped in such a way and without any kind of indication such as an exception in the .net code itself. Being that this was an isolated environment that I am using for development I tried several different things such as re-registering the removing and re-adding the custom extensions, re-registering the .net extension core assemblies, uninstalling the client and re-installing and the same with the server components. I also tried the code on several different instances of SalesLogix to see if it was isolated to this VM image or it was a different issue. I finally tried to create a simple .net extension stub, install in into my SalesLogix instance and lo and behold it worked. Given this information I went down the path to see what could have gone wrong with the custom extensions that were now working. I noticed that the assembly version for one of the assemblies was 0.0.0.0, which seemed strange to me considering there was an automated build task to handle upping the assembly version. Looking at the assembyinfo.cs file gave me the final pwop moment that I needed. It seems that somehow the assemblyinfo.cs file was empty and that the needed metadata that the .net extension code needed was not compiled in the assembly. I located the previous version of the file in history and after compiling and re-adding into the SalesLogix instance all was well again.

 

So lesson learned, make sure you have valid assembly info providing the much required metadata.

 

Mark

Apple Determines the Market

I was reading this morning on how Apple decided to to allow an iPhone application to be released on their App Store site because of their internal perception of market demand. Specifically citing ‘little utility ‘ in the response letter to the developer. I can understand if Apple set standard/Policies of the types of application that can be created but to determine that the application will not have a broad appeal seems so quite draconian to me. Given that Apple completely controls the distribution channel for the device I believe they are held to a higher level of openness and to consider the fact that the market will determine the kinds of applications it wants and are willing to pay for. It is completely fair for Apple to have some kind of metric that determines when an application is removed based on inactivity however to not allow an application completely again is in my opinion is wrong. I can also assume the determination if an application has broad appeal lies on a select few internal resources and this selection process I am going to believe is based on those individuals ‘gut’ feelings.

In this age where we as a developer community are crying out for more openness, and opportunity is Apple going backwards? They control hardware, software, and now the market place, they are trying to control the levels of communication and interaction that the developer community has.

I guess the question I want to ask is can Apple still do no wrong? What is the market share Apple has to have before we start to ask for more as a developer community supporting their platform. I may be off track here but the one thing I can always attribute to Microsoft over other vendors is the support they give to there development community, and the level of openness has only gotten better.

Stung by ASP.Net 3.51 Bug

I love Visual Studio 2008. I even refer it to clients when setting up the SalesLogix Web Client to have available in case there is any debugging that needs to be done.

One of my customers on my recommendation installed vs2008 web dev express which now also will install SP1 of the .net framework. Luckily his site was in test as we found that users were unable to log in. After much head banging we discovered that the action tag on the form in the web page was not being rewritten correctly since it already had a value in it (javascript:void(0)) and therefore not causing a page post back.

 

More information can be located from here

 

The fix is to locate the action attribute in the Login.master page on the form tag and remove the action attribute from the tag completely.

Note that this is a SLX Web Client 7.2.2 and below issue and has been addressed for the 7.5 release

 

Mark

Note :

Further testing reveled that base.master, default.master, login.master, and dialog.master all had the action attribute set. To fully fix this issue the attribute needs to be removed from all of these pages. For example if you do not remove the attribute from base.master navigation will be broken on the detail pages such as account.ascx

 

Cheers, and have a good night

First Run at Chrome

Since I do a considerable amount of development in web applications and more specifically with SalesLogix web client I decided I should at least try to run the client in Chrome. I stayed outside of using the extended features to get a feeling of how things would work with the basic application (rendering, Java Script and the like) and wow … I can honestly say that the browser can perform. Everything seems to be extremely snappy. I am now thinking that this may be the kick in the Pants that MS needs to focus on performance in IE. I also love the capability of extracting tabs from the main browser window and spawning new windows. Pretty cool. From an UI stand point I do not see it as that much different from IE except for moving the URL edit box/tool bars into the tabs instead of the main window. First impressions very positive.

Mark

I’ve gone Bold

As the business grows I am starting to audit the things that I do and pay for in my personal life and determine if they are actually business related. One thing that I have been paying for was my mobile phone. I have had the same BlackBerry 8800 for 3 years now, which I have used in Corum, Sage and now in BITtelligent. Since we have been getting busy here I felt it was time to move the phone over to a Company account. I also needed to upgrade my office managers phone to a BlackBerry as well so it was a great time to trade in my old device for a new BlackBerry Bold. It should have been easier.

I called Rogers and explained what I wanted to do, Move the 2 existing phones over into a business accounts. After moving between service agents for a better part of an hour on the phone the job was done. The agent told me to go into the local Rogers outlet and pick up the new devices (Bold, Curve). When I arrived the store’s terminals were not working optimally so the rep needed to call in the order where he was told that we had gone back to tier 1 pricing (tier 5 good – tier 1 bad). At Tier 1 I would have to pay almost $800 for the Bold. I had to call there ‘Retention Agent’ to discus the issue. The instore agent, and the rep on the phone with the in-store Agent could do nothing. After some heated discussion (mostly on my part) and 40 minutes of time with a ‘Retention agent’ the Phone were appropriately priced. Rogers also provided some perks for the discomfort caused in the process.

Once I finally got the device in hand there were 2 things that I noticed. The weight and profile of the device – lighter and thinner, and the screen was so much more vibrant. Now my initial data plan was $60 for 25MB, the rep on the phone provided a plan that was $30 for 300MB, when I finally walked out of the store the final plan include 6GB for $30 so switching at this time was definitely a plus. The only thing on the device that seems strange to me is the ‘ball’ instead of the scroll wheel. But so far I am impressed with the device overall.

Google Chrome

We have IE, Firefox, Opera web browsers already. Looks like Google is now poised to enter the Browser market with their Chrome browser. I just noticed this so I do not have a lot of details, but from the screen shots it really looks like a less then stellar release. Do we really need another browser to have to test for?

Cost to develop on a Mobile Device

I have been reading lately more and more about apple and the Apple iPhone, and more specifically around the developer experience. More and more I am formulating some thoughts on my perception of writing a application on the device and what seems to me to be great limitations.

  1. Lack of community interaction on development. Legal NDA’s imposed by Apple make collaboration difficult , though not impossible with subcontract workaround.
  2. Costly distribution model. With Distribution handled by Apple other sales and marketing efforts are hindered, such as introducing a BP community into the mix
  3. Application verification process, and the type of applications that can be developed.

With the Apple having ultimate control on the types of applications that can be created and the capability to easily remove from both the Store and users iPhone’s applications installed I am bothered because ultimately apple now controls the level of external innovation that can occur. It also makes you wonder if a great Idea comes before apple, if they will take the high ground and let the developer distribute it, or indeed make a clone under the guise that it was something they were already working on.

Now I have developed for both Windows Mobile devices and also RIM BlackBerry devices. Each have their strengths and weaknesses but from a developer standpoint these platforms are more open.

RIM provides the JDE free of charge to developers, Documents can be downloaded from their web site and Forums are available for developers to collaborate and discuss development Issues. I have been to one of their developers symposiums in Waterloo and for the 2 days that the event went on, the discussions were quite open and frank. If you do not like developing in the JDE (feels dated to me) you can even use eclipse. There are also multiple ways to develop for the device including a plug-in into VS. For the most part you are pretty free to develop without intervention from RIM. When you do decide to deploy your application to a BlackBerry you will need to get a Signing key which allows access to protected device functionality.

My wife recently started here career as a Real estate agent and I have to get her a device.When I pick hers up I have decide to upgrade mine as well to a BlackBerry bold. The BlackBerry I have now is a 8700 that I got when I was at the RIM conference some years ago. I am looking forward to trying some development on the BlackBerry Bold and working with some of the newer API’s. I really wish that there was a native database engine on the BlackBerry, that would have cut down development costs and shortened time to market. A large amount of effort really was/is around data access and when I last looked generally fairly primitive ways of storing/retrieving data were available on the BlackBerry device. I could attribute most of the difficulty in developing with the platform for the DB and distribution needs.

Microsoft provides a butt-load of information on developing for their mobile platform. There are forums on the compact framework and large community efforts around development on the devices. Visual Studio is the development environment here, though you could actually use the command line. The toolset in my opinion are the most mature and can get a developer up and running in the shortest amount of time. What I really like about the process is the single install to get everything working. I also like the desktop parity where I can re-use much business code. Now that Microsoft has also released a desktop version of the SQL CE database engine it is possible to also re-use data access code between the mobile and smart client  application. In my experience Windows Mobile and CF provide the best developer experience and because of the pliability of the platform it is actually easier to try new ideas with less developer costs.

Now each of the platforms (iPhone, BlackBerry, and Windows Mobile) a different development language is used. On BB and WM it is possible to develop in Java but that limits the potential of the WM solution going back to J2ME limitations.  When I first got started developing mobile solutions I looked at a client application implemented in Java on a Windows Mobile device and honestly the performance was absolute crap. For me it did not matter if it was in the runtime, or the processor on the device or memory or any of the other variables, it just sucked. Scrolling down in a window would display so many paint defects that It soured my tastes of java on a device.

Later on when I got into BlackBerry development I saw an implementation of Java that was much faster but was also very limited on what you were allowed to do.

Apple pushes the developer to use Objective-C. I have to admit that I have little knowledge of this language. I have largely worked in C#, VB.net, Java but have not had the time to get into developing on the Mac. The other issue I see with Apple is to develop for the iPhone you have to do so on Apple hardware. By all estimates hardware costs can be 2x that of PC hardware. I do own a MAC and will try the platform to formulate more first hand experience as soon as I get some quality free time.

Now I have looked at Amazon for books on developing for the iPhone and it does look as if there are books available or will be available shortly. This is good news and I will pick up some up to bootstrap the process.

Remember to switch to x86

I know I have posted before about getting SalesLogix functionality running on a x64 based machine but I really wanted to reiterate the point. Yesterday I was working on a .net extension for a client and wrote a test harness for verifying some UI functionality.  When trying to log in I was getting a ‘Provider not registered error’ .

I went to the properties of the harness application and changed the compile from ‘Any CPU’ to ‘X86’ and ran the second time and all worked as expected.

SalesLogix 7.5 Cannot Build Error

Today I got a call from one of my customers that could not build the new web client in the RC2 install of 7.5. The error that was occurring was due to the fact that some Attribute types could not be resolved. After looking at all of the usual suspects I decided to look at the Visual Studio build project that is created when the interfaces were being build. I also looked at a local project that I had here in the office.

Close inspection showed that the Sage.Platform reference path was different on the 2 machines. Mine was within the application directory where his was in a installed web client bin directory. This seemed strange to me, however I looked in the bin directory and noticed that the assembly dates were early 2008. Definitely an old version of the web client and would not have the functionality that was being referenced.

Note that this web client was installed in the Application Architect folder path as a sub directory. We moved the folder out of the Program File directory and then restarted AA and all compiled correctly. So it looks as if the process of generating the entity interfaces and compilation will have a difficult time if the web client is stored under the AA folders.

Coding for Clarity

From time to time our clients ask us to look at software that was developed for them and assess its quality. This potentially leads to a refactor process where we might clean up code to reduce redundancies, make it more maintainable or to put it back on track to meet the end clients need. One of the observations that I have made and seems to resonate is with the way Adhoc SQL queries are written in code. I know that generally its not the greatest Idea in all cases and other solutions exist like stored procedures, ORM frameworks and the like but they are not always a viable solution to implement.

Back to my point.

Queries from what I notice are a concatenation of string parts and for the most part very difficult to easily understand because of this fragmentation. Core to the refactoring process is identifying the duplicate functionality and moving it into a shared component following a more DRY approach and increasing the overall maintainability of the project.

To this end I convert most of the adhoc sql statements to string.format( method calls that provide a string that looks as close to the requisite SQL as possible. That way through simpler inspection it is possible to see where the duplicate calls exist and identify proper patterns viable for a code refactor.

 

Write only enough code to do the job Right

Another thing that is really important is the KISS factor where doing only what is required for the current context is important. For example if you are using a constant value such as “T” do not call a format function as you are unnecessarily creating extra string objects and doing more work this is required. Set the value to “‘T’, ” if it is required and reduce the work.

Some Helper Functions can be Evil

We all write them, and use them extensively in our development, but helper functions need to be understood and applied in the most relevant places. For example a function that retrieves a single value from a database table can come in handy in a pinch. However, when the function needs to be called several times within a calling chain it is better to retrieve an object that is a composition of all of the needed values, reducing the round tripping to the database. For me one of the most evil functions that has come out of the SalesLogix scripting world and into the .net world is the get field call. This method makes it too easy go get values from the database and also too easy to write inefficient code.