Tuesday, October 15, 2013

Registering my dbi treeview control

This post is mainly a reminder to myself about registering the dbi treeview control that I use in some of my forms. What is happening is I have my development environment going good, then I create an installation file which registered the dbi treeview activex control during intallation. I run the install program; test the installed program. All is good so far. Then I go back to my development environment and I don't have access to the treeview control. Bummer.

To fix this I re-register the dbi treeview control as follows:

regsvr32 "C:\DBITech\CTOCX4\Components\cttree.ocx"

Then all is good.

I'm sure there is a better fix, like making sure the dbi activex controls are installed somewhere else so that a similar path could be found on installation. Or, maybe I need to change my installation routine of my custom application to check first before registering the treeview control before registered the supplied ocx file.

Thursday, November 24, 2011

Thankful for SWFox 2011

Happy Thanksgiving! I've been out of town the last few days in California installing my software at a on-line university. This is the latest version of my software converted from VFP6 to VFP9 and using all views instead of a mix of tables and views. The trip was a success, but not without challenges.

I was told before I got there that their server setup was a terminal server. I was nervous about that, but after attending a session at SWFox on Thin Clients I was actually looking forward to giving that a try. I had also been told that their workstations were a mix of XP and Win7. Since I had attended a session on Win7 and VFP I knew there could be some issues. But, since they were using terminal server I wasn't too concerned and didn't create any installation files for the workstations.

Once I got on site in turns out they are not using terminal server; they are using just a file server with a LAN setup; call it a language problem as the IT guys are Koren and misused the term terminal server. Shucks, I really wanted to see how terminal server was going to work with my application. Now I needed to make an installation file for the workstations. I had an old installation file that was created with PC Install, but it was quite outdated. I knew that I really needed a new installation routine, but until recently I had no idea how I was going to create it.

At SWFox 2011 I was talking with Doug Hennig about the Win7 problems and he told me that he uses Inno to create his install files. I hadn't had a chance to look at it yet, but I figured that is what I would use. While I was in CA I downloaded Inno and spent the better part of a day playing with it. It turns out that many in the FoxPro community use this program and I was able to find several scripts on line to show me how to install all the files I needed for this installation. Monday night I created my install routine and then on Tuesday I installed. All worked very smoothly.

The real point of the post is that I'm thankful for SWFox. The past conference was very good for me. Going to the session on Win7 opened my eyes to potential problems installing on a Win7 machine. Then, having that conversation with Doug where I learned about Inno was very beneficial for me. I would say that those two things paid for the conference for me. There are still several other things I learned at this year's conference that I haven't even got to yet; so there are still dividends to come from attending the conference.

Thank you SWFox! And thank you to Rick Borup for posts I found on Inno scripts.

Sunday, November 6, 2011

The Importance of Message Boards

Do you visit message boards for the software/frameworks that you use?  I do, but not as often as maybe I should.  I use two frameworks, Visual Fox Express (VFE) and Web Connection; so I visit their message boards occasionally.  I use to visit the Universal Thread (UT) too, but I haven't visited there in a while.

Basically there are two reasons to visit message boards: 
  1. You have a problem you can not solve and need help to find a solution.  So you reach out to the community for help hoping to find a solution to your problem.  
  2. You want to give back.  You have received help and therefor feel a duty/desire to help others.
  3. Documentation... This is a third reason which I explain near the end of this post.

The Web Connection message board is one of the best and looks very nice.  Rick Strahl has also created an application for the desktop that comes with Web Connection so you can download messages in the topics that you are interested in and then view them on your desktop computer.  I prefer this over searching messages through the browser.

Years ago I made a suggestion to a user trying to help.  His reply to me was very sarcastic; so I made a mental note not to help him any more.  That can happen and I just brushed it off.  I have received a lot of help over the years via message boards.

The UT is huge.  I find it difficult to find information and there is a lot of chatter and clutter.  I believe it can still be a useful tool, but for me I like the framework message boards better.

The VFE message board doesn't see much activity anymore, but there is still a core group of users that visit regularly.  Since this is the framework that I work in most, I try to visit about once a week.

Just the other day I had a problem in my application that looked familiar to me.  I've been converting my primary application from VFE6 to VFE9.  I've been experiencing a few problems with the conversion.  When I saw my problem the other day I believed I had seen this same problem before but couldn't remember the solution.  I knew I had posted the problem on the VFE message board before, so I went to the message board and searched on my name.  I found the post I had made with the problem, which later also included the solution.  So, I found the solution to my current problem to which I had posted the solution to a couple of months ago.

That brings me to a third reason to use message boards.  It is a good way to document a problem and a solution.  By using a message board in this manor you are also potentially helping others.  I am glad that I had posted my problem as well as the solution.  Did it help others?  I don't know.  But, it sure did help me later when I forgot the solution and needed a memory.refresh().

So, if you are not using a message board I encourage you to do so.

Friday, November 4, 2011

SWFox 2011 Review

This was my third SWFox (3 in a row) and for me.  I believe I got more out of this year's conference than I did out of the last two combined. I will come back to why that is later in this post. I arrived in Phoenix almost five hours later than I was suppose to. There had been fog in Dallas and that messed up my departure from Pensacola and my connecting flight. It made for a long travel day.

I arrived early to attend Rick Strahl's Web Connection (WC) pre-conference which was two full days of reviewing WC. I had a hard time deciding whether to attend or not because Rick had told me it would basically be the same material as last year. I had never looked at any WC from last year. Last year it was a lot of WOW! for me, but honestly, a lot of the material went over my head. I am glad that I attended again this year. This year we covered the material a little slower and I believe more questions were asked; I know I asked more questions. I had gone into these sessions wanting to get a better understanding of WC's Web Controls. I believe that I have achieved that but I still need to get my hands dirty with it to get a clear understanding.

The keynote on Wednesday night was given by Steven Black. His topic was niche marketing. I really wish there was a video posted of the keynote so that I could watch it again as there was a lot of points Steve made that I would like to watch again as I'm having a hard time remembering everything. Some of the points made in the keynote:
  • As VFP programmers we are older which means we bring more experience to the table.  As a result we can deliver a product quicker that is more complete and bug free.
  • VFP is still a great tool and often times is actually the best tool for creating the types of programs that we deliver.
  • We need to expand our toolbox to remain competitive which means we need to know how to use other data back-ends and know how to create browser based applications.  Many of us are doing that already, but we need to be good at those tools.  In short, be good at using several tools not just an expert at using one tool.
Now on with short reviews of the sessions I attended.  I will review these in the order in which I attended.

Class Design Strategies: This session was rather basic and easy to understand.  I believe the biggest point made was that the developer can add functionality to a class any time, but care must be taken to not break default behavior.

VFP and Thin Clients: I went into this session not really knowing what to expect and for the first five minutes considered leaving.  What was demonstrated was the use of Terminal Services to run an application.  This was a good demonstration of this strategy for delivering an application to multiple users.  I found this very interesting and I'm glad I attended this session.

Developing VFP Application for Windows 7: I am so glad I attended this session.  Doug Hennig covered some of the gotchas in deploying an application on a computer using Windows 7.  I had no idea; so this was a real eye opener for me.  It is so much better to know about these things now rather than finding them out when at the customer site.  As far as value goes, this session delivered.

Remote Data: Switch to SQL Server w/o Redesigning Your VFP App: I've been to several sessions on using SQL Server but I'm still not using it.  I know I need to and I am working on that at the present time.  This session was rather basic but it gave good information for those that haven't used used SQL Server.  One of the topics covered was how to mimic the delete flag.  It was a good discussion.

One thing that I did get out of this session was a SELECT statement to get a total record count on a table.  I know, everyone knows how to do this, but it hadn't occurred to me to create a view just for this purpose.  In the past when I was using VFP pages I would just use RECC("myTable") and store to a memvar, not so easy to do with remote data.  Since returning home I have created a view with SELECT COUNT(*) from myTable and I'm using this in my revised application; works great.

Easy Multi-Threading with Visual FoxPro: This session had the biggest WOW! factor.  Kevin Ragsdale did an excellent job of providing real life examples to demonstrate the use of multi-threading using Christof's DMULT.DLL.  I immediately saw application of this in one of my applications.  Thanks to Kevin for taking the time to put this session together.  I heard of several people that were equally as enthusiastic about putting this in their apps.

Wanted: More Processing Speed!: It was good to attend this session immediately after Kevin's session.  Jody Meyer demonstrated using ParallelFox to do parallel processing.  It's a little different than the multi-threading technique.  The examples given were very interesting, especially demonstrating setting the number of processes that would be going on at the same time.

Joins and Subqueries: Using the SQL Commands for the Hard Stuff: This was the best demonstration and explanation of joins that I have seen.  Tamar Granor explained the different types of joins very clearly and had excellent slides that showed the different types of joins.  While I have worked with joins I am glad that I attended this session.

It's so, uh, "gray"..Tips & Tricks to Improve Your App's UI: VFP allows the developer to create some really dazzling interfaces, but is that a good idea?  That was what this session was about.  Kevin Ragsdale showed some examples of how a well intentioned UI changes when users have selected different widows colors or themes.  I have always been very interested in interfaces.  I have more books on design than any other topic (besides VFP specific books).  A user expects applications to behave a certain way and what they see in the interface is their perception of the application.  The bottom line is that the developer must respect the user's windows settings.  Great session.

Fox on the Run: This session was about creating mobile applications.  It was very interesting, but unfortunately I didn't get to see the whole session.  Eric Selje did show some cool things using CSS and mobile developer tools.  I am looking forward to reading the white paper on this session to learn more.  This session did have a bit of a WOW! factor, especially when you take into account that more smart phones will be sold than the combination of both desktop and laptop computers combined.  This represents a huge market and a direction that consumers are going. 

jQuery UI & jQuery Plugins for Making Your Ste Look/Work Better: This session presented some great material with examples.  The 75 minutes went by so fast.  I am looking forward to reading the white paper on this session and using some of these plugins for my web apps.

How Craig Boyd Makes Me a Hero!: Rick Schummer covered several tools that Craig Boyd has developed that makes adding certain features to an application very easy.  By using these tools the developer can look quite smart and appear as a hero to the customer.  Rick says that in the white paper he explains how to find these tools as they are not really in a central location.

Looking Back: Techniques I'm Glad We Used: I don't really have any notes on this session, but I do remember that some of it went over my head.  The premise for the session was a discussion that Steven Black had with a fellow developer on a past project that told Steve that many of the things they had developed were still in use today even though the customer was trying to "modernize".  The design was still very solid.  So, I took from this to take the time to design it right the first time.

Show Your Apps: It's always interesting see other developer's applications.  My hat goes off to the people that are brave enough to stand up in front of strangers and present their applications.  Often times English is a second language for these presenters.  For me the most interesting app I saw was an app for a tablet PC to be used in the field.  The presenter had done a lot of research on tablet PC's.  It was quite interesting to see how people are finding solutions for various problems.

Programming Standards and Guidelines for Software: For me this session was more of a confirmation of practices that I already subscribe to.  It is so important to have standards and guidelines and stick to them, especially in a group development environment.  It makes reading code that much easier.  BTW, I am a spaces developer vs. the tab developer.

Twenty Tools to Make Your Life Easier and More Productive: As developers we use several tools (other applications) to make our life easier.  Rick Borup did an excellent job of presenting some of the tools that he uses, sometimes on a daily basis.  It is nice to see some of the tools that another developer uses.  It made me feel good to know that Rick uses some of the same tools that I do.  I will be looking into some of the tools that he mentioned that I don't use.

Creating ActiveX Controls for VFP Using .Net: If you want to give your applications a different look, ie give it that "more modern" look, then create some controls in .Net.  Doug Hennig showed how this can be done.  I found this session very interesting, but I don't know when I will be able to play with this.

Yep,  I attended 15 sessions plus the Show Your Apps bonus session.  Several of the sessions were rather basic, but that was good for me; some of it was re-enforcement and some of it was clarification.  Looking back over this review I see that I was impressed with two sessions with a WOW! factor.  I've already implemented something I saw in one session.  Another session made me aware of potential problems I may have in the very near future if I don't look into today.  All things considered, I got something out of every session that I attended and I found all sessions to be relevant.  It goes without saying that the presenters all did an excellent job and are all professionals who also treat the attendees as professionals.

It almost seems ridiculous to me now that I was on the fence about attending in the first place; I am so glad I attended.  In reviewing my previous post I can't say that I did everything I had planned to do, but I did most of it.  I have returned from the conference feeling both positive and motivated.

I did not poll other people as to what they are doing for the future  The future is uncertain; there's no denying that.  But, almost 20% of the attendees were first time attendees.  To me that shows current interest in VFP.  It was pretty clear to me that VFP developers love FoxPro as much as I do and still intend to use VFP.  I know that I intend to use VFP but I do intend to expand my knowledge and create some different interfaces and back-ends.

How did I get more out of this conference than the previous two?  It's pretty simple actually; I didn't party as much.  There's actually more to it.  I went with certain goals in mind.  Plus, I've been active in coding lately so my mind was fresh with current experience.  I saw things at this conference that I definitely want to put into my applications and feel confident in doing so.  It seems that in past conferences I will see some really cool things but don't see how those things would apply to me.  At the 2011 conference I saw cool things that I believe do apply to me.

I admit that I've been scared of the future and almost paralyzed in development because of outside forces telling me VFP is dead; if I listen to the outsiders it is impending doom.  Attending the conference has solidified my resolve to continue on the path I'm going using the tools I know and love.  More importently I feel both encouraged and motivated to be the best I can be after returning home from the conference.

At the closing session the organizers said that before the conference it was questionable if there would be another conference next year because attendance was down.  It was scary for them as registrations were very slow in coming in (sorry to say I am guilty of being one of the late registrations). But, because the 2011 SWFox was considered a success there will be a conference again next year; they just don't know if it will be the same format or same location.  I for one plan to attend next year.  I do like the current format and the venue works for me.  I like the current venue better that the AZ Golf Resort.

A big thanks to the conference organizers; they put on an excellent conference.  Also, a big thanks to all the presenters who put in hundreds of hours creating their sessions.

Tuesday, October 18, 2011

Preparing for SWFox 2011

I have finally made all of my arrangements to attend SWFox 2011.  For a while I thought I wouldn't attend.  It's been a rough couple of years with very little revenue; I was having a hard time justifying the expense.  But then it dawned on me; I couldn't really afford NOT to go; I always find attending very inspirational.  Lucky for me, I found some extra money and signed up.

I read over my review from last year.  I was pretty excited about SWFox 2010.  Craig Boyd had given a great key note.  I was feeling confident about developing in VFP/VFE.  Yesterday, after reading over what I wrote a year ago, it occurred to me that I didn't follow up on anything that I had written.  Shame on me!  What have I been doing the last year?  I have converted my primary application to VFE9 (but still in beta) and I am currently working on accessing data only through views to prepare for migrating the data to SQL Server.  I will write a post on that later.  I hope to put this new app into production next month.

So what do I hope to get out of attending SWFox 2011?
  1. Catch up with friends.  Sounds a bit social doesn't it?  Well, these are some of the brightest minds in the VFP community, so there is much to learn from them.  Besides, where I live I have no interaction with other VFP developers because there are none.
  2. Learn something new in the sessions.  There is always something really cool to see and learn.
  3. Find out what others are doing for the future.  What are people doing to prepare for the future.  I will expand on this a bit more further down in this post.
You see, I'm getting a lot of backlash from using VFP.  I'm being told it is dead.  I can argue till I'm dead that VFP is a very good tool; a tool that gets the job done.  It doesn't seem to matter to the opposition.  They love my application and the solution to the problems; they just don't trust the tool.  They want the application re-written in a more "modern" language.  They want it written in C# with a browser interface.  They want a SaaS application in the cloud.  Hey, I can do that with Web Connection.  They don't care; it's still VFP.  But I'd be using HTML5, CSS3, JavaScript, and who knows what else.  Does it still use VFP?  Yes.  That's not a viable solution.  Arrgggg....

Speaking of tools, I still have tools in my toolbox that I got from my grandfather.  I'm not about to throw them away; they work just fine.

Sure, I can learn C#; in fact I would really like to learn C#.  But how long will it take me to become proficient?  I love the tools that I have; I'm very good at what I do.  Currently, there is a group looking into outsourcing the conversion of my app into C# with the browser interface.  I have told my business associates that once the work is complete I will no longer be able to support the program.  This is taken as a refusal of me learning a new language.  Not so I say, it just takes time to become proficient.  Besides, the company doing the work is using their own framework.  It's just very frustrating and I find it all quite confusing.

So what are others doing about this problem?  How much new development are they doing in VFP?  That is just a couple of the things I really want to find out at this year's SWFox.

Sorry for a bit of ranting, but it is what it is and I'm trying to find the solution.