Tuesday, May 26, 2009

Jump to a Column in the Advantage Data Architect

In the most recent service update of the Advantage Data Architect (version 9.10.0.9), you can now quickly jump to a specific column in a grid.

The search can be activated by clicking the magnifying glass in the top left corner of the grid, by right-clicking and choosing "find column..." from the quick menu, or by using the keyboard shortcut CTRL-ALT-F.

Friday, May 22, 2009

ARC: Did You Know #6

The ARC "Did You Know" post today comes from Advantage Senior Software Engineer Lance Schmidt. Thanks Lance!

Did you know the Advantage Data Architect (ARC) can be configured to  automatically limit the width of columns in grids? On the User Interface tab under Tools –> ARC Settings, you can configure ARC to limit the width of columns by selecting “Limit amount of data displayed in grid cells”. This option sets the maximum width of a grid column in pixels. Instead of a grid that looks like this:

 

blog_before

 

you get a grid that looks like this (after setting the option and opening a new query window):

 

blog_after

Wednesday, May 6, 2009

Search All Things Advantage from Visual Studio

After watching this post on the DevExpress blog, I thought it would be cool to do the same thing and search all of the Advantage documentation quickly from inside the Visual Studio IDE.

Follow the same steps Mehul used in his post, just use the following for your macro definition in place of the DevExpress search:

Sub DevZoneSearch()
        DTE.ExecuteCommand("View.WebBrowser")

DTE.ExecuteCommand("View.URL", "devzone.advantagedatabase.com/dz/content.aspx?Key=17&SearchKeyWords=" + _

DTE.ActiveDocument.Selection.Text + "&tab=-1")

End Sub

 

Now you can highlight any Advantage property or class name in the editor and run this macro to quickly pull up all help file documentation, knowledge base articles, newsgroup posts, service updates, tech tips and screencasts that match your search term.

Friday, May 1, 2009

Writing twiPing

A few months ago I started using Twitter. As with most first time users I was slightly confused and disappointed. I found building a network slow and cumbersome, and without a network of followers I found little value in the service. I kept at it, posting a tweet whenever I published a new blog post. At one point one of my 5 or 6 followers re-tweeted one of my blog posts. I took a look at his profile and noticed that not only did he have 400 followers, but he had 400 followers that almost entirely consisted of my target audience. At that point the light bulb turned on and I started to see the value in Twitter. 

In addition, once you have a set of relevant followers with similar interests, you can ask questions like "What third-party controls do you use when developing WinForms applications". If you have 20 followers, you probably won't get any answers. If you have a few hundred developers following you however, the replies and suggestions are almost instant.

 

My Motivation

I found building my network via the Twitter web site cumbersome. I slowly fumbled around finding people with similar interests and following small handfuls of their followers. In turn these people would usually follow me, helping to build my network. While this process worked, it was a manual process that could be automated and it was way too slow. Twitter is by definition all about real time conversations and instant gratification, yet first time users are met with no facilities to get them up to speed quickly.

From a technical aspect I wanted to learn a bit about RESTful services I had been hearing so much about. I also wanted to write a WinForms application to see how far WinForms had come since the last time I evaluated it and blew it off (Visual Studio 2003).  I normally write GUI Windows applications using Delphi, but wanted to force myself to use WinForms.

The Twitter API is a RESTful API and is fun to play around with so it seemed like a great candidate for my experiment. If you ever wonder why there are 4,078 different twitter applications out there, I think a big part of that is simply because the API is fun to use and returns active real time data.

 

The Application

The application was fairly easy to write and I have posted it for others to use. It is called twiPing. The name came from a mixture of "Twitter" and "ping", as I felt like I was pinging people to let them know I existed and might be an interesting person to follow. Yep, if you haven't caught on yet this is where you notice I'm a developer and not a creative marketing-type. Anyway, it's out there so I'm stuck with the name now. At least the name is unique which makes searching for references on the Internet easy!

twiping

twiPing is a fairly functional Twitter contact management application. It allows you to mine other users friends and followers, apply filters to batches of users, follow and un-follow batches of users, find friends who are not following you, find followers you are not yet following, and quickly build a network of like-minded people.

 

The Components

I used three third-party components building twiPing:

  • JSON.NET
  • Developer Express XtraGrid, XtraBars and XtraEditors
  • Advantage Local Server database engine

JSON.NET

I've written about JSON.NET in the past. I had a blast using it. I also came away with Advantage product ideas based on JSON.NET.

 

Developer Express Components

I was leaning towards using DevExpress components initially, as I'm familiar with them from years of Delphi development. After a quick post to Twitter asking what components WinForms developers were using, there were plenty of votes for DevExpress so I made the purchase. I ended up using their grid component as well as their ribbon control. I still need to add some icons to the buttons on the ribbon control, but I'm on a fixed budget and have little artistic ability so they only contain text for now.

I love DevExpress components. My core competency is system-level programming, which means by definition it is hard for me to construct a user interface that doesn't make people cringe! DevExpress components allow me to simply drop their components in and have a great looking application with very little effort.

I was also REALLY impressed with how similar the grid control is to the original Delphi version of the DevExpress grid. The properties and layout are almost exactly the same, which put a big dent in my learning curve and instantly made me more productive.

I'm certain there are less expensive options, but the grid alone is worth the money. This was a play project I wrote at home, so I certainly thought twice before buying my own personal DevExpress license, but I'm glad I did.

I've mentioned this in the past, but I still think DevExpress has the best support portal in the business. I enjoy asking questions there and always get outstanding help. The interface and feedback mechanism are outstanding. I seriously think they should package their support portal and sell it to other companies.

 

Advantage Local Server

The Advantage .NET Provider and the Advantage Local Server were a perfect fit for this project. I needed a free in-process database server with royalty free distribution. In addition, twiPing is a multi-threaded application, and performance and locking were a concern. The Advantage Local Server is fully concurrent and uses row level locking. This means I can have multiple threads all using the database and the job queue at the same time without any bottlenecks or serialization of database requests.

Future twiPing features are also going to utilize the full text search engine built in to Advantage and also available in the local server product.

 

What I've Learned So Far

No matter how many times I read it, it is incredibly hard to post a utility or application that is not "feature complete". You will often hear people suggest you ship the first version that is useful, and then iterate on that and take direction from your community. I agree this is a great approach, but as an engineer it just kills me to publish something that doesn't have all of my ideas already incorporated. It is easy to feel like it could reflect negatively on your skills. In addition, other developers are often so quick to point out flaws it makes it even harder to adhere to this advice. With that said, I've learned so much from this experiment I'm still extremely glad I made the utility public. I've received some great feedback.

Old school desktop applications can still be cool. I pay next to nothing for web hosting, and I can scale no matter how many people keep downloading the application. If this application were hosted, not only would I be paying for bandwidth for the incoming traffic, I would also be paying for all of the traffic from my application out to Twitter.com

With automatic update functionality in the application, I can still push frequent updates to users, even though this isn't a web application.

Marketing people want Macintosh, Adobe Air, or web applications (duh).

Web proxies are a pain.

I had to modify my assembly to specifically target the x86 platform in order to load my 32 bit database drivers when run on a 64 bit OS. See Scott Hanselman’s Back to Basics article about platforms and .NET.

The Delphi VCL shows its age after using the .NET framework. The VCL really needs serialization and reflection (among other updates).

Building installations and dealing with version numbers and upgrades is not fun.

I've heard the intellisense in Eclipse is better, but I REALLY like the intellisense in Visual Studio 2008.

BackgroundWorker threads in .NET are awesome. I loved how easy they are to set up and I like the built in facilities for reporting progress from the thread.

Google Analytic stats are addictive. I wake up at 6:30 every morning and check the new web site statistics immediately.

Requiring the .NET framework 3.5 to be installed for a simple application like this is a bit of a pain. Delphi really excels here with native win32 applications and very simple installations.

Delegates in .NET are cool once you use them a bit, but I'm a C guy at heart and would still rather use a function pointer!

 

My Twitter Accounts

For more ramblings on software development you can follow my @jdmullin Twitter account. For twiPing updates you can follow @twiPingSoftware.