My Kung Fu is Strong

Ya, a goofy title, I agree.

This post is somewhat a rant and I hope that it is received well. I generally get many, many requests on how to do something on SalesLogix web platform, or coding in general. I have not really a problem with the questions that are directed as could you point me in the right direction, or what are your thoughts. I do however have a problem with the requests that come in for full working examples of functionality. The reason I have problems is that for the most part its pushing the development and and training effort on me. The fact that I may have the ability to create the solution quicker does not negate that there are real hard costs to making the solution work, generally of which the requester is working on a billing project. Creating this examples can take anywhere from an hour to many hours, I have even had request for work that would take days to provide a solution. For the most part those who also request are not supporters of the community and are only looking for a quick solution to something that is racking their brain.

This is where I remind those who request these working samples that software development is what I do. These things you request are things that I have personally had to learn and invest my time into. I am in no way compensated by Sage to support the community, there is no MVP program, or recognition system. I have to pay to be a partner, for my development software and all of the books that I read to ensure that I keep ahead of the curve. The other thing to keep in mind that I have work commitments like the rest of you to deliver code as expediently as possible and creating these samples pushes billable hours, and can encroach on the little family time left.

I have been toying with a couple of ideas, and would appreciate some feedback to what you dear reader think of the feasibility.

1. Create and distribute a monthly SalesLogix web Journal for a sum of $ per year (Good Idea, what would you be willing to pay)

2. Create a training video subscription that includes web, mobile, C#, debugging topics (Good Idea, what would you be willing to pay)

3. Developer on hand program. For those that only need a few hours per month a way to have direct access and get the coding samples you need but would pay for them

4. Fly on the Wall training. When doing an engagement having web ex meetings on specific items to have a developer watch and mentor around the most difficult parts to be delivered.

5. Architectural review and pre-engagement consulting

I really think that all 5 are advantages for any BP looking to be able to do more web business even if they do not have the core developer completely up to speed on the web development. It also allows you to tie the costs to a development and not have more bench time to finance.

Some of the other things I am trying to gauge and hopefully you can provide some feed back is around specific community needs.

1. Do you see a need for Mobile Development Book if so would you buy one and what would your expectation of price.

2. Do you see a need for more mobile training outside of what Sage provides.

3. Do you see a need for virtual events where several industry notables (Ryan Farley, Stephen Redmond, and Me ) provide special event training. Is this something you would attend?

4. What gaps do you see in tooling. documentation, training, support, and development do you see that would make your life much easier to deliver compelling solutions.

If something I provide helps you please also do send me a small email and let me know. Its always good to hear feedback.

Thanks for reading, If you have any thoughts please email me at mark.dykun@BITtelligentdev.com or give me a call at 519.260.0999. 

Handling Custom Grid Binding

Grid Binding with GetByMethod

So lately there have been questions on how do create a filtered datagrid using the Sage SalesLogix web platform. This is a valid question and the coding around it is somewhat trickier then just binding to a simple list data source. In trying to solve the problem most would go to the GetByMethod approach and find that it would not work based on the training sample. I believe that the functionality had changed between the 7.5 and 7.5.1 timeframe and really requires a bit more.

So we are going to do the method slightly different.

1. Create your business rule method as usual choosing to IList as the result out value

image

2.  Write your query code using projection based query. What I mean is that instead of having NHibernate return full entities we want just field values specific to the grids results.

 image

3. Iterate through each row adding the result in to the list

image

The propertyPaths are there to define the fields in the object and their specific order. Order counts so make sure to line list to match your projections. You will be creating a ComponentView object for each row and initializing it with both the property path values and the data for the row.

The business rule itself is done. The final piece of the puzzle is the setting of the EntityType property on the datasource. Since we are not returning a specific entity we need to change this value to return Sage.Platform.ComponentModel.ComponentView instead.

Once this is your custom grid is ready to go.

 

Custom Filtering

I am not going to give a full sample on this one but to point to what I perceive as right direction. Many SalesLogix web developers still shy away from breaking out visual studio and hand coding a smart part. For some of the more advanced methods of handling this functionality it really is the best solution. GetByMethod is great when you want to handle specific use cases but can be somewhat inflexible due to how the method is bound and invoked in the standard smart part. More specifically starting to add filter parameters in to the mix is not an easy thing to do. Other thoughts are to code several methods and just change them up, however if your query code is to be dynamic and allow users to enter a parameter you still have the problem of passing in extra data.

This is were I would advise breaking out the method, and adding the parameters required to meet the use case. Using a custom smart part I would handle the databinding and calling of the business rule myself removing the extra code/goo that would be generated.

Once the functionality was correctly tested in VS I would remove the old smartpart and import the new one into <portal>\Support Files\SmartParts\<Entity>\ making sure that it was available for deployment.

Mix and the future of the Web?

Mix starts in less then 45 minutes. Unfortunately I was unable to attend in person but will be watching the keynote and trying to follow as close as possible to the information that comes out of this event. I am not expecting to hear much that will have an impact on the development or design decisions I make today, but rather indications of the choices I will have to face in the near future. I would really like to see Silverlight get more traction and within the space of business applications become a more robust platform. Hopefully what we will see will be real, tangible feature sets and products that we as consultants, and development companies can take hold of and enrich our customers experiences with.

if your interested in the key note it starts at 9:00am (Vegas) and you can see it at http://live.visitmix.com

Just a little rant .. Move Along

Last night I watched John Stewart’s program where Jim Cramer of CNBC was put on the hot seat. Through this program the single thought that resonated within my mind is that Financial advice should be dull, boring and pragmatic. The culture of making important long term investment decisions should not be based on ranting, or entertainment but on solid fiscal information. I have to admit that I really enjoyed the grilling, and the pointing out of what seems to be the duality of the system of them and us. For the longest time ‘we’ as in the common hard working people have been sponsors of a lifestyle and attitude that determines benefit and bonus not through real world success, but through perceived success, over inflating, and manipulating the market.

The fact that Jim could come on and try to rebuff the accusations, and find himself falling completely short with capability. Jim was called out and from what I could see, rightly so. I would hope that others would also be called out to ensure that the people who watch and believe that what they are watching is information that is the best interest of the general population. However it seems to be targeted to the select few who fill their own internal coffers. I really believe it and expect that there is not easy path to getting wealthy. Its a mix of hard work, sweat, tears and pain that allows you to get ahead. If its easy then there is something that is amiss, if extraordinary promises are made chances  its not a real tangible and sustainable situation. I honestly do not watch CNBC much, I had through the presidential race, but I am starting to find that the reporting on most of these stations are biased one way or another. Simply put most reporting as gotten to the point of requiring the element of entertainment/sensationalism due to the ongoing pressures of advertising dollars. Splashy screens and over promising tag lines to prop up viewer ship seem to be the norm. These in my opinion are a misrepresentation of truthfulness.

I am in no way a journalist nor a financial expert . I spend my days punching on a keyboard and writing code. I will not speak of my personal methods of saving/investing because quite frankly it is personal. I do want to point out however that the advice that we see on TV does not provide the deep and pragmatic thought required to plan for the future. I would love to see a separation from the financial news and the organizations they cover, to ensure that there is no vested interest in the success of the underlying organizations. How really is it possible for these cable companies to offer unbiased information when they themselves have such a vested interest in the market, and their employees as well. I am not a fan of the SCC and its methodologies as I believe that entertainment should be managed by free speech and choice but I do think that any show that wants to say they are a Financial reporting show, should be regulated and have to follow rules of disclosure, and how they advertise themselves.

These are tough times, and the last thing we need is more of the same. Lets call out our financial experts and make them accountable to providing truthful evaluations. To stop the marketing of a brand and to give real world advice that benefits everyone.

Twitter – Take 2

Ok so as a follow up to the last post, If I go to the Twitter site I can Block a follower. Cool, I just cannot see that feature on Twhirl. But at least now I can create the restraining orders 🙂

Twitter, The Sucky, Crappy, Stinky side of Micro Blogging

So Twitter is this cool conversational tool, we all get that. With micro-posts we can tell everyone who cares what we are doing at any given moment. If we so choose the momentary brain fart that is growing in our heads can be quickly deposited into a message the size of 140 characters. For uber geeks it seems like the perfect choice for long term, non regionalized discussions. When someone wants to join in the the conversation they indeed do. This I am very cool with but what I am finding, and I am sure it happens to all of the ‘Twitteratti” is those that are following seem to be less those interested in the conversation and more those wishing to muddy the waters with pure crap. Lately more and more are following me. Names like Kristal, Katie, and Kristen. Droves of female followers. Now one would think that a Geek developer would be ecstatic  with the endless stream of followers that seem to be likened unto exotic dancers in some far away place, but really the fact is that these individuals represent a single URL/Company and in my mind is nothing more then spam.

I currently use Twhirl and for the life of me cannot find a way to ‘boot’ or ‘Deny’ a follower access to follow me. Kinda like the 50 ft restraining order, it would be nice to have a hedge of protection from the commercial underbelly that seems to be bubbling up more each day.

I am also seeing a trend on Facebook as well where individuals are identifying themselves as friends. People of whom I have never met that only want to connect to solicit their wares. Case in point last night I got a friend request from an individual that is trolling for Primerica, looking for recruits to continue the legion of failing money managers here in Ontario. I do not see where someone would think I would in anyway want to expose myself, or the matter fact my friends to any of these schemes.

A call to action to the creators of Twitter, allow me the courtesy to control the list of followers. In a way this could save you some effort and band with in distributing the results because we as the community can clean out the legions of crap followers, who do not represent individuals that are genuinely interested in the conversation or what I have to say, but are there like shills to ruin the experience for all.

A call to action for the developers of Twhirl, please give me a better UI. Allow for grouping and organization of messages that come in. I do not always want to read from top to bottom. I would like to group all messages on the same screen in a hierarchal view. I would also like to remove/clear out all of the replies to my messages and not see them every day when I log in.

For me Twitter messages are conversational, I really do not need them archived and any conversation that needs to be long lived will be in the form of an email. When I press the clear button, please actually remove the messages and not just hide them from view.

For those who follow, please bear in mind that I am a software developer. When I post more then likely it will be geek in content or some wild ass brain fart that revels some current thought. I do not buy crap from companies that I do not know. I do not download shit from sites that could cause any kind of disruption to my life. Get rich schemes, get a free item … garbage does not interest me in any way. I have enough computers, technology and things I need that I will not subscribe for the **Free** gift. If there is something I want I can afford to pay for it and will happily do so to support the economy, and companies that I believe in.  So if you are following with the intent to try and get me to sign up, download, or whatever it will be a waist of your time

Editing Control Templates

I had to add some required field validation around some of the input fields in project I am working on. Nicholas Galler provided an excellent method in his blog at http://blog.chivinou.net/2008/05/13/required-textbox-on-saleslogix-web-client/

So I went into the VFS and edited the template for the text edit control and renamed the control to have the _req suffix, compiled and deployed. In checking the quick form I noticed that the output was not updated to include the new RequiredFieldValidator. After a moment of head scratching I came to the conclusion that the templates that are displayed in the VFS were not the ones were getting applied in the build process. So after some digging it looks as if the VFS explorer shows the templates from the DB while when in a build the templates are being used from my file based VFS.  To confirm this a browsed over to the appropriate directory and edited the template there.

Now since I was in the file base template and this is really the first time I have edited a control template I decided to add a new process step in to my development cycle. I created a new folder under my root project to copy the template into and I can make the edits there from now. It also puts the edited templates into a single place for easier consumption in future projects.

Once the template was edited, I rebuild and deployed and the code was altered as expected. So lesson learned, if you are using a file based VFS not all things in the editors are where you expect they should be.

Note the updated template look on the text edit control

image

 

Happy coding

Easy Web SalesLogix Web Development Project Setup

When I start working on a SalesLogix web project I do a few things to make my life a little easier. Hopefully these steps will help make your experience a bit better.

1. Create a root development project folder for the client

Every client gets their own root folder that will contain all of work that I need to complete. I put this on a local drive.

2. Create a blank file based VFS for the project.

I do not start in the Database any more since I want to make sure that the customizations are completely isolated out of the SalesLogix database. This makes it easier to store in source code.

3. Import a project into the blank VFS.

I never export out of the Database VFS. I always start with a baseline project backup.

4. Make sure that everything compiles correctly and can be deployed. 

I will not put the file based VFS into source control until I have confirmed that it does work. If there is any repair work, or I need to reload the project its better to do it before it is in SCC then when it is not

5. Put the VFS in source control.

6. Create a Visual studio .Net Class Project.

This project will be located within the root development folder. The reason to locate them closely is that when you are adding support files the browser opens up to the location of the VFS. If they are close in proximity it is easier to find the assemblies to load into. I try to do most of my mainline coding in the assembly. It allows the reuse of some assets and allows for a better development experience including grouping of all of the source code into a central location. If your using Visual Studio 2008 it also allows for the usage of better constructs.

7. Create a Libraries folder

Your .Net class file will need to reference core assemblies. Creating a library folder under the root will allow you to put the common assemblies need to build your code in one location. This way if you move your project or provide it to someone all of the required build artifacts are easily located. It may be advisable to create a batch file to copy the assemblies from a source location like the deployment bin folder into your library directory in case you need to refresh some of the assemblies (Sage.Entity.Interfaces, …)

7. Add a asset folder for all of the artifacts (documents, images and the like)

8. Make sure everything is checked into Source code control.

I would not check in the library files as they can be regenerated as needed.

 

If the File based VFS cannot be located when Application Architect is opened it is possible that you will get a fault. So if you are using swappable or USB drives to store your project files on and they are not currently docked this could be a cause of problems. Keep that in mind as the project loading functionality is not quite fortified.

Mark