Skip to main content


Showing posts from 2010

Joys of XML Serialization

Love it or hate it, XML is everywhere and for data and objects, it can be extremely useful. On one of my last projects, a colleague introduced me to the useful XSD2Code project, which creates a .Net object from an XSD. This made it easy for him to build a structure that could be compiled into code to ensure everyone followed the same structure. This is extremely valuable if someone gives you an XSD as a format to write to and you want to populate it using an object. In a more recent project, we needed to share details from a component with another calling application via a web service. Enter XMLSerializer, the .Net equivalent of taking an object and dumping it into XML. Dim s As XmlSerializer = New XmlSerializer(Object) Dim w As New StringWriter() s.Serialize(w, Object) return w.tostring Sounds great, right? It was for a short time, but as the object got bigger, it contained more collections and references to other objects. Eventually, the Serialize method took up 100% of

Where are my features?

Here's an innovative way to show your customers where certain features are at in the development cycle. FreeAgent Depot — A furtive glance behind the wizard's curtain How well do you communicate with your clients about upcoming features?

HTML5 is Microsoft's cross-platform play

This makes an interesting development. I wonder if MS is going to come out with some form of XAML-HTML5 converter to support the developers who have devoted significant resources to Silverlight on the web. Silverlight *is* Microsoft's tool for Windows Phone 7 development so that's not an entirely lost investment. Personally, I love XAML and use it for client development. WPF is far superior to WinForms but the loss of Silverlight as a long-term "supported" web tool isn't going to sit well with many. Microsoft's Muglia reconfirms HTML is Microsoft's cross-platform play | ZDNet TechDays Ottawa is coming up - it will be interesting to see how this announcement plays out at it. I'll be speaking on using Expression Blend and SketchFlow for prototyping but I certainly won't be focusing a lot on Silverlight as an application platform - WPF for clients is where it's at. Update: Here's  a good article that compares MS' new strategy to the

PEM Editor 6 Now Released!

Jim Nelson has just posted a new update to his super popular Property/Event/Method editor on VFPX . There are way too many features to count on this - but you can be sure that Cathy Pountney will be covering them in her SW Fox Session . That said, some super-useful features that make this not even just an editor but a whole IDE enhancer: a) Go To Definition b) Extract to Method - the very easy way to refactor highlighted code c) BeautifyX d) Object comparison e) Design Time event handlers (auto-resizing for one) If you haven't tried it, there are some videos available but I'll also be doing some for an upcoming post. Note: I spoke with Jim on a recent FoxShow interview before this release came out. VFPX FoxPro VFP

Another Reason to visit SW Fox: Software, Software, Software

Doug recently linked to Kevin Ragsdale's post about why people should attend Southwest Fox. If you've been listening to the FoxShow recently, we've been interviewing speakers and there are more interviews to come in the next few weeks. AKSEL is also proud to announce that we are offering two subscriptions to MSDN Visual Studio 2010 Ultimate for attendees. If you don't already have MSDN, this is effectively your way of getting every piece of business/developer related software from Microsoft. Rick, Doug and Tamar will be drawing for the lucky attendee at this year's conference - so you have to be there to win it. As a note, if you DO already have MSDN, Pay it forward and be sure to throw the subscription back into the hat for others who may not be getting it to get the chance to work with the latest development tools from Microsoft. Note: this subscription also includes great designer tools like Expression with Sketchflow which I love for prototyping applica

Simple But Useful VFP Tip: Remote Views with SQL Server varchar fields

Note: This is a feature that's been in VFP for years - but I've often found that useful features often remain hidden until someone points them out. So I'm taking to finding my little VFP tips as I come across them and re-posting them here. I work in a variety of environments but one thing I always keep with me on my USB drive is VFP. Regardless of the data I have to work with, I always find that a task comes up that is infinitely easier in VFP. The funny thing is that other colleagues on a team who haven't been exposed to VFP are usually amazed at how quickly stuff can be done. Today, I was working with a SQL Server table and SSMS only lets you edit the first 200 rows on their own - otherwise you have to script it (or use another tool). For most of these systems, I typically create a VFP Database Container and then create remote views as necessary. Oftentimes, the problem is that when VFP comes across a varchar field that is longer than 254 characters, it immedi

Turning on the Lightswitch

Microsoft announced a brand new tool for business users yesterday called "Lightswitch", which (according to the announcement) makes it easier to build business applications for the desktop or the cloud. Beth Massi sounds super excited by it, describing it as a tool that makes it easier to build data-centric applications, something that FoxPro developers know a little about. Mary Jo Foley discussed Lightswitch as a tool similar to FoxPro: " The idea, my sources say, is to bring the Fox/Access style of programming to .Net". I don't buy that or maybe more to the point, I wouldn't put FoxPro and Access in the same boat to begin with. This sounds more like an "Access" version of InfoPath which lets you "build advanced forms for line of business applications". If you walk through the screen shots shown on Jason Zander's intro page, it looks more like an application Setup Wizard or a "template-driven" application builde

SW Fox 2010 Location Changes!

I received an email last night from Rick Schummer, announcing a fairly big change for Southwest Fox 2010 - it's no longer in Mesa, Arizona - it's in Gilbert. Previously made reservations at the Arizona Golf Resort have been cancelled - instead, the conference will be at the Legado Hotel and SanTan Elegante Conference and Reception Center in nearby Gilbert. The new location looks amazing. Use the code "SWFox" when registering. Southwest Fox is the annual gathering of FoxPro developers with great sessions on development tools, techniques and practices.

Google promotes travel by kayak

I was planning a trip and looked up some directions in Google. Unfortunately, Google Maps went the wrong way and figured I wanted to go to China. That wasn't a big problem until I read the directions. Check it out below: I had to double-check my settings. I was looking for car directions (not walking) but still, instead of flying or taking a cruise 2700 miles, Google thought I could travel best by kayak across the Pacific Ocean. Priceless.

Ken Levy on Servoy in Europe

Sounds like Ken Levy is really getting big on Servoy and convincing VFP developers to look into it. Fresh after his Servoy webinar . Details for a special seminar on July 5th in the Amersfoot, Netherlands are available here . Eric den Doop : VFP Developers from Europe are invited at 5 july 2010 at the Servoy HQ in Amersfoort - Netherlands FoxPro VFP

Mindmapping with iThoughts, MindManager and Box.Net / DropBox

I love it when I find an implementation of technology that has likely existed for a few years but works (almost) seamlessly the way I need it to. I may have missed it the first time out but it's still important to let people know how they might find it useful. iPhone Mindmapping with iThoughts I've spoken about Mind-mapping and MindJet many times before. MindManager is a great tool but when I'm in a short client meeting, I don't always like to pull out my notebook. For the past year, I've been using iThoughts on my iPhone and really enjoying how well it integrates with MindManager, using its innovative "transfer" capability (it creates a web server on a Wifi connection and gives you a web page to upload and download files). MindJet's iPhone interface is remarkably similar to the iThoughts interface - almost to the point of it seeming like a direct copy or re-licensed version. However, when my iPhone was upgraded to iOS 4.0, it also upgraded a

LINQ, Reserved Names and .Net

Here's another good reason not to use reserved names. I'm working on a LINQ project with a series of tables that manage user roles. As a result, I have table names like Systems, Roles and Users. My trouble started when I would add the objects to the Designer, hit Save and then suddenly Visual Studio would say things like "System.Data.Linq.Mapping.DatabaseAttribute is not defined" or "System.Nullable is not defined" In short, stopping me dead in my tracks. Now that I look back, I don't know why I didn't see the reason earlier. When using the Object Relational Designer, Visual Studio wants to be smart and changes any words that are plural to singular so they make more sense when dealing with data. That way, your code looks like oUser = New User oUser.UserName = "John" instead of oUser = New Users etc This is really nice because it does make the code a little more legible except in this situation: Plural (singular) Users (User) Roles (Role) Us

Intense Development: Why We Need Passionate Programmers

At a conference a few years back, I formally met someone who I had been speaking with online for a few years. One of his comments was "wow, I didn't realize you were this intense". At the time, I was surprised as while enthusiastic about the conference, I didn't think I was being that noticeable. But I will admit - I am very intense or passionate about the things I do. I think that's very important to the developer and consulting world and far too often, it's missing. Programming is an analytical and (supposedly) fact-based process, which is why most programmers tend to be left-brained. This discernment is more myth-based (as logical sciences such as maths are handled by both) but more creative or emotional types are said to be "right-brainers". Today, when you need both programmers and designers rolled into one (or at least combined in a single project), this can get tricky. As a consultant, I deal with a number of clients. Some I have had the ple

Ken Levy Webinar: Servoy for Visual FoxPro Developers

For those who didn't receive the invite, Ken Levy is doing a session on how FoxPro developers can work with Servoy, a java-based development tool. You can register here . There's also an intro screencast you can see here . I looked at Servoy a few years back and it looked pretty cool for development. As Ken notes in his email "Servoy is a very community oriented product with passionate users reminding me of the enthusiastic FoxPro community. " Should make for an interesting demo.

WPF: Bubbling Events from User Controls

While building a WPF application, I ran into a scenario that immediately called for a bubble event. While the basic concept behind it is pretty straight forward and there are a number of examples to show it, when I put it all into practice, it didn't work. I got it working and it's just a little tweak but hopefully no one will spend the time I did looking for it. Bubbled events do exactly as they sound: the event fires at a very low level and then continues up the application hierarchy waiting to be "handled". In a traditional application, you might have a method called cmdSave_Click which handles the Click event for the Save button. A bubbled event is more akin to button groups in VFP, where you may have four buttons and when one is clicked, the code to actually handle it is managed in the button group's method rather than the individual button click. Take that concept and expand on it further. A real-world example that I remember Steve Black once using is Help.

New FoxShow: Jim Nelson Interview

In the latest episode of the FoxShow , we feature an interview with Jim Nelson, who is the main project lead on the PEM Editor project at VFPX , on his history with development and how he comes up with some of the ideas he's been putting into PEM Editor. FoxPro VFP

Looking for Data: A cool framework class

As the article below notes, almost every application needs data searching. In Visual FoxPro, the first time out, many developers use a browse or a grid. Or a user enters a value into a text box and the code behind it might look like: IF SEEK(tcValue) DO FORM details ENDIF But from Foxite and Jijo Pappachan, comes a very cool and easy to use Lookup class. The class handles both SQL and VFP backends with ease, allowing for smart optimization. Of course, if you're already using a framework, you may already have something like this - but this is something that should certainly be put into an updated FFC on VFPX . If you've ever used the existing FoxPro Foundation Classes search tool, it's pretty limited. This one is definitely more in line with how applications are looking these days. The sample pages don't work quite right and it needs a few tweaks to handle large field names but it can be easily called manually. lo = NEWOBJECT("lookupdata","lookup") U

New FoxShow: FoxPro and Silverlight

There's a new FoxShow episode featuring an interview with Uwe Habermann about moving from Visual FoxPro into Silverlight. This is a preview of his upcoming Southwest Fox session. You can download it directly or subscribe in iTunes. Enjoy! FoxPro VFP

VFPX: New PEM Editor Beta Now Available

If you haven't downloaded the latest PEM Editor from VFPX , you're definitely missing out. Instead of the traditional tiny dialog to add properties and methods, the new PEM Editor gives you literally everything at your fingertips. See here: It's not just a good replacement for adding, it's also a fairly good replacement for the Property sheet as well. It's also starting to add features that VS developers have had in their IDE but VFP never got them. Some immediate highlights (not just from this release but overall): a) ability to mark properties as favorites globally (so any instance of those properties regardless of form becomes a favorite) b) Dockable and resizeable c) highlight inherited and custom code and properties with colors d) Go To Definition e) Extract to Method - kind of like instant refactoring Not only that but PEMEditor features the funky VFPX-Powered logo, which I think needs to become standard for all VFPX IDE controls. Great job! FoxPro VFP

SQL Scripts: Record Counts

As I'm populating a sample set of data in a SQL Server project, I needed a quick way of identifying what tables I had missed. Here's what I came up with (but a much faster way is noted below using the sys tables). --- Identifies zero record count tables declare @vtb varchar(200) declare @vsc varchar(200) declare x cursor for select table_schema,table_name from information_schema.tables open x fetch next from x into @vsc,@vtb declare @vcnt int print 'declare @vcnt int' while @@FETCH_STATUS = 0 begin set @vcnt = 0 print 'set @vcnt = 0' print 'select @vcnt=count(*) from ' + @vsc+'.['+@vtb + ']' print 'if @vcnt=0 print ''' + @vsc+'.'+@vtb + '''' fetch next from x into @vsc,@vtb end close x deallocate x Note, that the script does support the schema tag but it does expect you to already be in the database (via USE). This generates the output into the message window where you can then take it and run it.

From VFP to Silverlight (at SW Fox)

Looking at the Southwest Fox 2010 workshops list, it looks like this year's conference will have a silver lining, thanks to Uwe Habermann and Venelina Jordanova (from the dFPUG). The day after SW Fox ends, they are presenting VFP to Silverlight, showing how VFP developers can use a VFP COM server for the business layer and Silverlight as the main UI. Maybe just an interesting is the note on what Visual Extend will offer: "The next version of Visual Extend will come with a wizard that allows the migration of forms and reports from existing VFX and VFP applications to Silverlight." Another good reason to be heading to Mesa in October. FoxPro VFP

Vote Now: Visual Studio Project and Solution Version Compatibility - .NETicated

As Steve notes on his big post: Visual Studio Project and Solution Version Compatibility - .NETicated , "Microsoft is saying though that they listen to Connect votes. Today Kathleen Dollard created a Connect item for this issue, and I encourage you to vote. It’s important. It matters. And Microsoft says they take action based on Connect votes." "And remember, by not voting, you’re telling Microsoft this is not an important issue." The link site is here

SQL: To Schema or not to schema?

To schema or not to schema - That is the question; Whether it is easier to find a table with a Schema.TableName ; Or to simply build one with a strong naming convention, and, by opposing schemas, force other developers to learn (and re-learn) No more, with schemas ; It's an interesting dilemma - especially when designing a database for an organization who changes standards with almost every new development project. One recent project implemented schemas along with a naming convention so much that the schema name was repeated in the name of the table: SCHEMA.SCH_ClientName Definitely overkill. But then if I want to be able to separate out lookup tables from my other tables, having a LOOKUPS schema would appear to work, except that it creates the "extra typing" scenario as every table has to include the schema. There are a few alternatives: a) prefix tables with naming conventions that make their purpose obvious. luStates = a lookup table of states and tblStates for a table

Opinion: RIP Slate, Courier - and what might be missing in the Microsoft tablet strategy

Last week, there was quite a blow to the entire Windows 7 tablet business. HP dropped the Slate (less than a month after its internal PR push) and then Microsoft formally confirmed and killed the Courier project, a potentially game-changing Windows-based tablet, or was it? The first thing that came to mind, unfortunately, was that while Windows 7 supports gesture-based input, it is more useful in a desktop environment (like the HP TouchSmart). I'm using Windows 7 and from a laptop and desktop, it completely rocks. I was in a business presentation two weeks ago and one of the Microsoft reps pulled out their tablet and used it quick effectively. But the Microsoft tablets (from Toshiba among others) have always been focused on the business end and putting your desktop applications into a pen-based environment. Today's tablets (or the basic hype around them), on the other hand, are more focused on consumer or "lifestyle" use. I've tried Chromium on a laptop and was le

Developer Viewpoint: Rapid Prototyping with SketchFlow

You can see my own direct review of SketchFlow here . This article is a great introduction to SketchFlow, which is found in Microsoft's Expression Blend. Rapid Prototyping with SketchFlow Unlike developer "design" tools, SketchFlow is really great at focusing on the interface and how users will interact with the application. I'm not a graphics designer so I know pretty much right off the bat, my prototype may not have the prettiest graphics designs. However, with Expression Blend, I was able to make the UI look half-decent. It uses XAML files to show case the interface - this is extremely useful as I just grabbed some earlier work being done in Visual Studio and dropped it in - worked like a charm. I was then able to make changes to the XAML from a designer's perspective instead of a developer's. With the SketchFlow Map, you simply draw lines to create a flow between "pages" of your application or to integrate shared components. When you build your a

VFP Stack Overflow: What's In A Name?

In the latest issue of FoxRockX, Ken Levy has an interesting op-ed piece called the Visual FoxPro Stack Overflow . I'm not sure if the latest issue is a re-hash of the original which was posted last summer. It's a little like the similar page on the VFP Stack, nothing all of the possible VFP projects, including VFPX, VFP Studio, etc, etc. What would you call it? The community decided a few years back that VFPX was a better term than VFP.Next. Is that still the best term? Perhaps more interestingly in the piece, Ken noted that the FoxPro trademark was dropped by Microsoft years ago. As a result, FoxPro and VFP can be found through search engines without anything having to do with the VFP Development tool. This is where the whole concept of stack comes up. If you consider that LAMP is (Linux,Apache,MySQL,PHP), what would a better term for VFP be? The bigger issue here for me is that how do developers "get" Visual FoxPro, without MSDN, moving forward. If you consider the

Carbonite and PRG files: Problem and Workaround

I've been using Carbonite for online backup for a few years now. I did try XDrive and I have earlier posts about how horrible it was. One thing I've always liked about it is the ability to pull back individual files almost like an incremental version update. The fact that the backup drives integrate perfectly with Windows Explorer is a definite plus. But when my laptop bit the dust recently (a <12 month old Toshiba power jack issue), I was hoping to rely on it for the restoring my files onto my new laptop. While I did have the physical drive from the Toshiba, I wanted to test it out for a full restore. That's when I found a major problem. By default, Carbonite does not backup what it considers to be system files (EXE, DLL, COM, etc). It does backup VB, CS , ASPX files without a problem. But Carbonite considers a PRG file to be a system file. I'm not quite sure why - but it does. As a result, none of my PRG files were backed up. As a FoxPro developer, this is tantamo

And Then There Are The Pickles...

A little bit of fall-out from eTecnologia's apparent abandonment of the VFP.Net project. VFPX could suffer from the same fate except that those involved are already supporting it as an open-source project. There are lots of ways of working with VFP in .Net and in any language. I use VFP pretty much every day and it's not part of the client's arsenal - but it turns around the work I need done - be it prototypes, sample data input and's faster and better than the alternatives. But it is simply one tool in the toolbox - like the screwdriver that seems to fix almost every problem - there are always times to use others. I'll post a little more on my own experiences but Hank's post here is very telling. We've heard about VFP Studio and also now about VFP.Net - in both of these cases, it might have been better to open source the two. ProSysPlus Blog: And Then There Are The Pickles

Disrupting the Business Application Market Place

This will likely be the year that Apple unveils a tablet-based PC. Nothing innovative in that - Microsoft has had Tablet XP and Vista for years and Scoble used to schill those as well. My thoughts on the consumer aspect can be found here . There is a bigger issue that developers need to pay attention to. Since the tablet will use a similar form factor (as reported right now) as an iPhone/iPod Touch, the tablet will likely support existing iPhone apps. So unless "full screen tablet apps" cost more than regular apps, Apple will need to change the entire pricing model for existing tablet style applications. When someone built an application for the Windows XP Tablet, it would be priced just like an existing Windows based application, so about $200-300. MindManager , for example, cost $395. The iPhone version costs $7.99. It will have to hit a lot of users to match the original price. Apple revolutionized music pricing with iTunes and even though the tablet may change the print o