Life in the trenches

Life in the trenches is about the mixture of forces in ones life. In my case it's family, work, and RPGs.

January 2006 - Posts

Database Fun!
You know I love transfering data manually from one database to another..
Posted: Jan 30 2006, 03:11 PM by Eric Rouse | with no comments
Filed under:
Latest Efforts

I always enjoy combining the things I work on.  My current project combines Axapta’s COM Connector and Web Services.  I would have to say I really enjoy working with web services since I’ve always preferred working from the business layer on down to the database level.  I’ll leave the gui stuff to those that get some type of enjoyment out of it and to those that are truly artistic.

At any rate; the current project design has allowed me to use some the module design work I did previously and plug it into the web service code I’m working on now.  The modules are designed such that they can be used by pretty much any application since they contain the basic framework and support functions to deal with Axapta.

I did run into one challenge during this process and that had to do with a field that is defined as a sequence number.  These remind me of the days when I used to work with Oracle since you have to acquire the sequence number.  This was one the things I had not done yet for Axapta but the solution ended up being a couple lines of code.  Just goes to show you that you things are (hopefully) simple when you know how.

When I get done with this then we’ll have multiple entry points that can be called from some of our other major applications for integration.  Some of the combinations with involve SharePoint, CRM, and of course Axapta.

Axapta Enums and the COM Connector

Ok, heres something I found out for sure:

You can not create an Axapta Enum via the COM Connector.. period.  I spoke with MBS the other day and they confirmed that it is something that is not in the implementation.  I did ask if that would be something that is addressed in v4 but it will not.  The advice I was given was to look at the raw values in Axapta and then pass in the actual integer value.  I propose the following alternative:

Recreate the enum in your C# code and then use the same element names in your connector code.  A couple of reasons:

  1. Numbers are fine but the meaning can change from time to time
  2. A single location to update in your C# code is just plain good programming

It is unfortunate that things like this take so long to find out for sure.  It reminds me of when I starting coding for SharePoint, the current version docs didn't have much information on how to do things.  Rest assured though, things.. and docs do get better over time of course that wont matter much then since we'll know pretty much everything we need to know.

Axpata Interest Building?
According to this post there is a building intrest in Axapta these days,  while that may be the case I don't think that just the change of the product name to Dynamics AX is the reason.  I think the real reason might be the push that is being made plus what was shown at the one session at PDC.  I did make it a point to tell the presentor that there should be more MBS products shown at PDC since most of us out there do touch the product lines in one form or another.  After all what is the name of the game in this market space.. Integration.  We'll see what happens at PDC'06 perhaps?
A short rant on Axapta

Ok, here is an Axapta.. or Dynamics AX if you prefer rant..

We are in the process of having a module from a vendor customized and we are also making some modifications to the system.  Heres where the problem starts; every time our var gives us a new code drop we have to go through a manual merge process to make sure everything is fat, dumb, and happy.

Needless to say I was not aware of that requirement when we started down this path and I’m not too happy about it.  I’ve always hated having to merge code when I was not the source of the two code bases.  I just wish there was a simple way for this to occur or.. better yet.. I wish we didn’t have to do it in the first place.

Podcasting, we likes it.

Anytime I take a look at something new I like to find something about it that I can relate to.  Well, I’ve been keeping my eye on Pod Casting for a while and from time to time downloaded a mp3 here and there.  I never really found anything that made me think.. wow not bad until now.

I recently downloaded an episode of Claybourne and was intrigued; You see this is very much like the old radio programs of the past.  When I was pretty young I used to listen to them but even at that time they were hard to find since the radio programs like this had long since gone away.  The best thing I was able to find in the not to distant past was audio books; all in all not a bad deal but they can be costly if your hooked on them.

At any rate there are some 58 short episodes and I’ve really been enjoying them so far.  That’s the nice thing about this; you can catch up in no time since everything is still out there on the net for your listening pleasure. After I finish this one I think I’ll have to find some more to add to the subscription list.

Happy listening!

ASI Web Parts - Worth a Look

I was recently given the opportunity to evaluate some great web parts for SharePoint and Windows SharePoint Services.  These web parts come from a company called Aperture Systems Integration.

The first web part I checked out was ASI Navigation for SPS since we had an internal need for a web part like this.  This is an interesting one since it is not intended to be placed into a zone.  What actually happens is the control is placed into the same spot as the top nav bar and gives you a nice set of drop down menus.  The installation was all done with a setup application; you are of course asked to backup the template directory before you do the installation.  All in all painless!

Another of the web parts is the TreeView.  This web part can take the place of the side navigation and presents itself as a tree like you see in Windows Explorer.  The only problem I had with it was that I have limited space on my portal’s left pane and so the text for some of the longer area names would ‘shift’ to the left to conform to the space available.  This shouldn’t be a big problem since you manually place the part on the desired page and not into the main templates; although I’m sure you could if you wanted to.

Password Manager; now this is a useful tool to have.  This web part lets you change your Active Directory password.  We also use SPS for our Extranet and had to put something in place for this. Simply put we could have used this when we deployed and it’s very customizable!

Need an Employee Directory?  ASI has one of those too, this one works with the profile database already present on your portal and gives you a profile search tool.  There are actually two web parts here, one for the directory and the other for the search.  Both are very customizable as are the other components since you have access to the style sheet that is used to render the content.

Bottom line is the prices for these components won’t break your bank account. They are good quality and easy to use.  I’ve pitched them to the powers that be here and I suspect we might be looking at getting them in house.  Thanks guys!

Changing Companies via Axapta's COM Connector

Well I finally figured out how to do this thanks to continued searching on the net.  I found a reference to Appl object which contains a similar function.  After that it was a matter of getting the object created and figuring out how to call the method.  If there was one thing that I wish C# would do is the optional parameters that VB does, the COM interface that is exposed by Axapta has methods for creating and calling various objects.  The problem is that the signature for these calls takes five parameters beyond the method or statement element.  In some cases it seems to be ok with passing in null but others it would seem that you need to pass in and empty string.  So far I've just been using the empty strings and that seems more consistent.

I have considered just wrapping the COM interface; if I do that then I can overload the method calls or translate them into the AxaptaParameterList object. And that’s another thing, when I was making the call to the function noted above I didn't use the AxaptaParameterList at first since there are only 2 parameters, one optional of course.  I ended up switching it just to see if that would get it to work and it did.  This is very strange indeed and I suspect that making the calls this way might be better even if it is more coding.

Here is the function I ended up coding:
(Notes: _Axapta is declared at the class level and DisplayStatus is a function that uses an event to bubble status messages up)

public bool ChangeCompany(string CompanyID)
{
   IAxaptaObject appl = _Axapta.GetObject("Appl");
   AxaptaParameterList apl = new AxaptaParameterList();

   apl.Size = 2;
   apl.set_Element(1, CompanyID);
   apl.set_Element(2, false);

   bool retValue = (bool)appl.CallEx("SetDefaultCompany", apl);

   if( retValue == false )
      DisplayStatus("Change to company " + CompanyID + " failed.");

   return retValue;
}

Bleeding Edge or Just Painful?

I always like working with technology that has few if any resources available for help when you’re stuck on a problem.  Although I say that I do tend to say I don’t while I’m going through the process.  The last time I went through this was with SharePoint back before the docs out on MDSN were updated to the current version.

My current endeavor is with Axapta and I find the same situation these days with it that I did with SharePoint.  Of course I always have to select a path that is not as well traveled and in the case it’s using the COM interface to exercise Axapta.  I did manage to find a few resources out there beyond MSDN such as a forum that is semi useful.

Right now I’m working on a migration tool, the idea being that we can perhaps reuse some of the code we generate later for web services and other integration tasks that come up later on.  The basic layout of the application uses an Interface and a base class for the modules that will be executed.

The main application iterates through a configuration file section and loads and executes each module in turn.  The modules end up being just the implementation to get the work done, the base class takes care of the log in/off.  All in all not a bad implementation since I will have some less skilled people writing a few modules here and there should we get into a crunch.

Blah, Blah, Blah.. Just say it already..
Well, we were watching the the Google/Sun webcast a bit ago.  Talk about painful, these guys went on and on for a while and never said anything.  I finally gave up and went here to figure out just what they were talking about.  If you want to take over the planet you need to spell it out people..
WSS Price Question
Well someone asked if with all the changes to WSS if they would be charging for it. I caught one of the Microsoft PDC staff here and asked.. He said he wasn't really the one to ask but why would they charge for something that was free to start with. I think the you'll continue to find the cost will be associated with SPS and the internet connector. From everything I've seen thus far this week WSS is the foundation component for a great many things.
Lots more PDC info!

Office 12

One of the first things that you will notice with the new version of Office 12 is the way the menus and toolbars work.  The short end of it is that most of the menus that you know are not there anymore.  The paradigm for the applications changed from command based to results based.  What this means is you will need to refocus the way you work but the good news is it seems to be easy after you do adjust.

You can think of the ribbon as an enhanced type of tool bar with more then one section.  At the top of the interface are what appear to be menus.  With the exception of the File menu the rest of them change the content displayed on the ribbon. As an example; if you click into a graphic the ribbon will change to expose graphic related functions.  Likewise; if you click into a table you will see table related functions.  On normal text areas you will see the most common functions that you perform on body text such as changing fonts, bolding and so on.

On the bottom of the interface you will see a new slide control.  This control changes the zoom on the document.  When shown in Word the zoom when from very large font size on the high side down to multiple pages on the low end.  Note that this does not affect the actually content but the size at which it is displayed.

One of the other new features that people with love is the preview.  This functionality will show the affect on your document when you select various things in the environment.  For example; when you are looking for a font to use the old way of changing the font; exiting the dialog; returning to the font dialog because you didn’t like it are gone.  With the preview you will see the affect on the document as you click on the various font names.  This too will not change the content in any way until you accept the change.

SharePoint V3
There are some serious changes here; in V2 of Windows Sharepoint Services the ASP.Net rendering was encapsulated inside of Sharepoint.  With V3 the opposite is true, ASP.Net has resurfaced and WSS is handled inside.  Part of the reason for this is that some of the core functionality has been pushed out from WSS.  An example of this is the implementation of Web Parts; ASP.Net now supports the use of Web Parts.  What this solved is the problem where there are two rendering engines for the same thing; one is WSS and the other in ASP.Net

This transition is to a more modular plug-in model.  The ISAPI handler that currently takes over your default website, no questions asked, goes away as well.  In fact the installation does not force you to install on the site default; you are given a choice where to place it.

Another important advancement is that the base class for Web Parts falls under the standard Web Control now, although you can continue to base them under the SharePoint namespace but the results are slightly different.  But the good part, depending on your point of view, is that you are able to use ASCX controls to author the Web Parts.  I do think its better thought to design them under the WebControl base instead though since there are a few rules that you need to follow.  I suspect that many shops will have a mixture until they decide on a preferred method.

Master pages can now be used to skin your sites.  An example was shown on how you can easily change the look and feel in code with just a couple lines of code.  The master pages also allow you to set the layout of the site with little trouble but you must note that the zones used for Web Part layout are not included here.  Any of the zones must be placed into the content pages but on the up site the manager is taken care of for you so you don’t have to plant on each of your pages.

CAML is still present in the definition of views but the good news is that you can now use templates to replace many of the forms that are used.  An example of this is the form used in a Document Library.  In one of the demos this form was modified to display some custom functionality.  This would be painful as best in the current version.  Additionally this prevents you from editing about 30 files to skin a site; this should make life much easier.

A couple of short notes related to WSS..
• V2 to V3 is an upgrade, not a migration like the last time
• WSS service pack 2 should be out by the end of the month
• SPS03 – There will be no ASP.Net 2 support period

WinFX
One of the most exciting things I’ve seen this week is WorkFlow!  If you didn’t hear about it yet WinFX contains a workflow engine.  There are a few models supported but the main two are Sequential and State Machine.  But here is the best part; this is not a server system but instead is a Framework.  This means that you can put workflow pretty mush everywhere and it’s mainstream.

Long term this will have an impact on BizTalk server and it will be migrated to utilize WinFX at the core of the system.  Now this isn’t to say that BizTalk will go away, it still has its place as it has advanced features and orchestration capabilities.

The tool set for workflow is there too, it integrates right into Visual Studio 2005 and gives you the design surface as well as the ability to run the workflow in the debugger. All in all I think this will be a great addition to the tool set we have as developers.

Well, I’m off for more info!

Then came the darkness...
So here I am, just after lunch, checking email in the internet area when POOF, out goes the lights, computers, everything even cell towers were saturated.  I walked around for a bit thinking it was a localized thing.  But no; as I'm sure you may have heard the power in LA was out completely.  After I determined that it was going to be a while I decided to make the trek back to the hotel; maybe they had power and internet service so I could at least get some work done.  When the shuttle wasn't going anyplace I decided to talk back with a couple others.  Thank goodness its onl a few blocks between the two.  It wasn't until well after I got back to the hotel that I found out the extent of the outage.

The day wasn't a total waste though; I did sit in on the Visual Studio Tools for Office session.. well the morning part anyway.  Now let me tell you this, I tried working with the first version of this tool set and boy was it rough going.. so rough in fact that I ended up working with a 3rd party wrapper.  You might think that would have helped but it was still a tough thing to deal with.  From what I did see this morning they have taken it to a new level, there are classes that sit between you and the PIAs now but you can still get access to the underlying objects from the interop.  Another nice thing to note is the fact that there is a rich set of events covered for many of the objects.  When compaired to the previous version, as far as events are concerned, there is much more there.  In some cases there were no methods exposed for some of the objects but in the new objects there are.  It looks like life will be much smoother when this is released.
And it begins..

I have penetrated the building! After getting here I am presented with pure Microsoft goodness.. The first stop was to the candy store, I scored a bib and teeshirt for my little guy.  The books were calling to me but I resisted thinking I should go to some of the tracks first but I suspect the drool was clearly seen as I walked through the area..

Well it was a long day.  I sat in on the SOA sessions and a lot of ground was covered regarding ASMX 2 and WSE 3.  I'm glad to see the improvements mainly with WSE since I had installed it once in a dev environment and had a number of problems with the implementation.  That was an unpatched 2.0 version and it did get me far enough to generate some ideas for the future.  Some of the nice things you can do with the new versions are to segregate the main part of the implementation and use the actual service classes from both sides, HTTP(s) as well as via TCP.

Another interesting point was the roadmap, the previous information remains true; you should continue to utilize the ASMX model for the best path to Indigo.  From the sounds of thing Indigo should give us some nice functionality well beyond what we currently have today. I can say for a small dev team the WSE crew seems to be doing some well needed work in this space.

Well, I'll leave you with a few pictures from the phone cam..

The eve before PDC

Ah yes, it is upon us at last.. images of Booths, Key Notes and PDC drinking games..

Oh yes, the PDC drinking game.. take note each time someone says the word .Net during the day; that will give you the number of shots you need to drink that night.  Well ok, I didn't think too long and hard about the rules.. maybe we should toss in something about skimpy booth girls that say .Net.. I must think more on this..

At any rate, to those of you out there that are going.. I'll see you there.. Enjoy!

More Posts Next page »