Discussion Locked

Visual DataFlex vs Visual Basic - Visual DataFlex Advantages

0 helpful
19 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Visual DataFlex Advantages

Ref: Should I rewrite my system in VB or VDF?

Visual DataFlex (VDF)

VDF?s main advantage is speed of development. On a system that deals with large quantities of data, VB will probably require twice the coding time.

One example of this is in error handling. In VB error handling must be coded by hand.

Another example of ?out of the box advantages? is the find messages of VDF. Coding ?find first or last? is completely supported and coded by VDF into augmentable methods available at both the object and datadictionary class levels.

Overview: VDF is designed for data awareness in a completely scripted environment while VB is not designed as a data aware out of the box solution.

Second, VDF is completely in harmony with your current code base and data.

A conversion of DOS DataFlex to VDF can take your tried and true code and move it mostly intact into an OOPS VDF system dependably without reinventing the wheel.

A conversion of DOS DataFlex to VDF also has the advantage of being run simultaneously with DOS. You can phase the system in gradually instead of being an all out conversion. You can even use the same data tables as DOS until the conversion is complete, and then switch over to client-server when VDF passes validation and takes over the complete role from DOS.

VDF is a great front end for many databases: DataFlex, Pervasive, MySQL, DB2, Oracle, and MS SQL Server for example. The same program code will work, no matter what database you choose (or switch to).

VDF has a 30-year history as a development language designed for working with data. VB has data capability as an add-on. The first 2 versions of VB weren?t even database aware!

VDF has a light footprint. Complex systems can run tolerably well on 5+ year old computers. VB.net requires ?power-user? type computers for all users to get reasonable performance.

VDF is truly Object Oriented. This type of programming makes development faster, cleaner, & more easily changed down the road. VB is ?Object Based? ? a partway implementation of the OOPs concept. One part of OOPs is ?Classes?. These allow flexible extension of the controls that are used to display data.

? For example, suppose you want to color all fields that are indexed (& therefore can be used for finding). Add the code for doing this into the class, recompile & now every instance of every field that is indexed will be colored. In VB, this change could take weeks ? finding every control & adding the code to it.
? Another major advantage to this process is centralized coding. If, for instance, you wanted to change the color assigned to the indexed fields VDF can do this by changing one centralized spot, giving both great power to your code, and also making month-to-month maintenance chores a snap rather than a huge conversion job.

VDF has Data Dictionaries. DD?s are arguably the most powerful part of VDF. All business rules & much of the custom code go here.

? The advantage? As a very basic example, say you always want the Customer Name capitalized. Set this in the Customer DD. From then on, every view, dialog, etc. that uses the Customer DD will always capitalize the Customer Name.

? Two years later, you decide to allow lower case. Go to the DD, change it there & then recompile the application. Every place that uses the Customer Name (doesn?t matter if it?s 1 place or 100) will now allow lower case.

VDF?s Interconnected Data Dictionary Rule Base:

In a VDF application, the database table rules are coded [as above] with basic and advanced business rules. Example: The customer table has a globally applied rule that says the customer can?t go over their credit limit. When you combine the customer DD along with the sales order and lineitem DD, this is what you get:
Customer

Sales Order

Lineitem

Now, when saving a new lineitem, the save operation cascades upwards to the customer table and any attempt to save a lineitem that puts them over the credit limit is denied!

VDF has interface features that make it far easier for the user:

Lookups: These are popup lists that (at the click of a button or press of a key) are set up to make finding easy. For example, to look up an order, you might show Order #, Date, Customer, Ship To, Total & Status. The user can really see what they need to do their job efficiently.

Indexing: Put the cursor in the Order # field & you can move back & forth through the table in Order # order. Put it in Order Date & you can browse by Order Date, etc. ? no programming required (except creating the indices).

The VDF interface is designed for data entry:

The standard VDF application is MDI (Multiple Document Interface). This allows the user to have 2, 3 or more views of data open at a time, but the whole application can be minimized at one click of a button. It also puts menus and toolbars at the top of the application so they don?t have to be added to each view.

If your users prefer to navigate from field to field with the Enter key (instead of Tab) ? add one line of code, recompile & you?re done.

Every action that you can do with a mouse, you can also do with a key or key combination. This means faster & easier entry for skilled users, while allowing the use of the mouse by users who prefer it.

VDF has backward & forward compatibility. An application written in version 9.1 will compile & run in 12.0 (5 versions later) with little or no changes to the code.

VDF pioneered teaming Windows applications with Web applications. A VDF WebApp can easily work with the same data (including the data dictionaries!) that your Windows system uses.

-End Post-
Ref: www.VisualDataFlex.Com
[free personal edition full studio license]

19 replies

by tony hopkinson

This is VB6 you are comparing to presumably?

If anyone is asking themselves whether to start writing in VB6 now, they deserve anything you can sell them.

If they are already in VB6 and they want to stick with windows, then C# or VB.Net for comfort is where they should be going.

It may be a great product, certainly compared to VB6 it should be.

30 years out though and I've never heard of it, bit worrying that.

by peter

Dear Tony,
Thanks for your response:

DataFlex has existed prior to DOS and was one of the original packages offered with DBase, FoxPro, etc. for developers when I started custom database application systems.

Now, as Visual DataFlex, it is tried, true, and tested and really a wonderful release currently with version 12.0

The database studio features a module called database builder, where you instantiate in class format, the business rules for each table in the database. This includes data aware settings like "column is capslock" or exit and entry methods for that column and lookup list associated with that column. This is the starting point in programming a VDF application.

Once you have programmed the business rules for each table in your application, then it's time to model the UI form. The studio automatically can create a subclass layer for all the controls in use, so that you can program your competitive features into classes and have them work system-wide using centralized coding and correct oops protocol.

The studio, once the data table rules are in effect, can create a windows app or a webapp.
The proper way to code is "no object code", but the studio allows you to insert object code which overrides the class code into each object.

The first step in building a UI form is to create a "tree" of related tables to be used in the form (called a "view"). This instantiates the class objects for each data table and allows you to customize the find/clear/save/delete functionality of the individual form, or simply to connect the "ddo's" data dictionary objects so they work together to enforce your business rules.

The great part about this is that in a very simple scenario where you have a main table, a parent table, and a child in a grid, you can automatically count on not being able to save the main file until a valid parent is found [out of the box] and with 4-5 lines of code you can restrict entry into the child grid until the main file is saved properly.

The find keys, error messages, save/clear/find/delete button bar all comes automatically out of the box intact.

It's true that VDF doesn't have a major market share, but don't let that worry you. It's a tried and true system with RAD database capability and you can really produce a product that is superior in reliability and data integrity to a .NET application in about 1/2 the time or less.

Look to the sample examples that come with VDF for guidance, and there is a TERRIFIC user support mechanism in the Visual DataFlex newsgroup: The url is: news://news.dataaccess.com/visual-dataflex

I invite you to try it out!

Peter Donovan

PS: any questions, please post and I'd be glad to answer.

by peter

A beginner?s guide to coding a custom database application in *Visual DataFlex
by Peter A Donovan/Applause Software/Boston.

*Visual DataFlex is a trademark of Data Access Worldwide of Miami.

Overview:
Here?s a conceptual step-by-step methodology for creating your first Visual DataFlex application.
Note:
Visual DataFlex is a ?transparent back end? database application studio where the same exact code runs on your choice of backend.
This overview assumes you will start with the native DataFlex backend as a starting point.
Goal:
To encourage you to try the Visual DataFlex studio for a test drive using [freeware] the Personal DataFlex edition licensed for personal but not commercial use.
This is a full studio deploy with no restrictions other than mentioned above.
Compelling Reasons:
You can produce a fundamentally solid application in ? the time as your current studio.

First, let?s assume you have the studio downloaded from www.VisualDataFlex.com and you are running on a 30 day eval prior to getting a license.

If you fire up the Visual DataFlex Studio, you?ve got the ?order entry? sample example workspace automatically loaded for you, and the current project is ?Order.src?. From this point, you should hit [F5] and the ?source code = src? will compile into an executable and run. Please check out the features of the running program. This, we will code ourselves in a new ?SRC? project to see how it was done.

1. From the menu, choose File-New-Project-Windows Project, and you will get a dialog asking for the .EXE name.
2. Please type ?Test? and press ok.
3. For fun, just hit [F5] and compile an executable, which you will find is a perfect MDI [multiple dialog interface] container with no functionality BUT? the button bar, menu headers, and runtime are all done.
4. Back in the Studio, let?s create a data entry program or form if you will. Click File-New-View/Report-Data Entry View Wizard, and click Ok.
5. From the wizard, click ?next? on the opening page.
6. For an object name, please enter ?oSalesOrder? and accept the defaults for the next 2 windows and click ?next?.
7. Next page: change the radio button please to select ?create a header-detail entry view? and click ?next?.
8. Now, the time has come to select the CHILD table for the data entry view, so highlight ?OrderDtl? and click ?next?.
9. For the ?header? data table, we will select ?Orderhea? and click ?next?.
10. Now, we select the columns ?fields? to show in the data entry HEADER section, and I recommend: Choose ALL the columns from the OrderHeader table EXCEPT the last one [last detail number] and click ?next?.
11. Now, we select the columns ?fields? to show in the child grid below the header, and I recommend: Choose ALL the columns [except for the FIRST : ordernumber] from the detail table and click ?next?.
12. Next, you get to customize the labels for each of the forms if you like, but the default has already been programmed into the datadictionary, so simply change the radio button to ?right? justify the labels, and click ?next?.
13. and ?Finish?.
14. Press [F5] which auto-saves and compiles your SRC into a EXE and test!
15. You now have a running program [under the view menu] which actually saves sales orders and detail lines. Not the most appealing visually, but structurally sound.
16. You will find that there are entry methods associated with some database columns, and exit methods associated with some. You MUST find a parent table record in order to save, and you MUST fill in some required fields. There?s a snazzy lookup list [expandable] for each of the associated tables, and some columns automatically are instantiated as comboforms for you automatically. A couple of small modifications later and we are on the road to deploying this. [omitted].

This is just a sample of the power of Visual DataFlex, and a few words of explanation are required to answer questions that this may have raised.
? The datadictionary for each of the tables has been pre-coded for you in this sample example.
? The datadictionary for the parent tables adjusts automatically, knowing that it is used as a parent reference, to be ?find required? in an excellent display of polymorphism. The same exact table behaves differently when it is the main table for data entry, i.e. no ?find required?.
? The key fields/columns of each table cannot be changed: they are protected from change via a checkbox in the datadictionary.
? The labels for each column are configured in the datadictionary so they appear consistent throughout your application.
? The lookup lists, called selection lists are assigned to a table-column in the datadictionary so they automatically appear with a prompt button with no code.
? The Order Header TOTAL automatically adds and subtracts based on what you do with the lineitems: delete/save new/change.
? The Product on_hand total automatically adds and subtracts based on what you do with the lineitems: delete/save new/change.
? For a real LASTING impression of visual dataflex, please note the quantity onhand of a lineitem product, and then CHANGE the product in the lineitem without changing the quantity. Then, choose the lookup, and you will see that the lineitem quantity has been moved back INTO inventory for the product you changed. Note: there are about 5 lines of code in the datadictionary that make this happen!
? Now, for real fun?, place the cursor in the header section on customer and choose DELETE from the button bar. Surprise, the customer is not deleted but the entire order and all of it?s lineitems are deleted. Repeat: place the cursor on the product code column of an existing lineitem and hit DELETE. The product is not deleted, but only the lineitem.

By this point, you may be ready to give the datadictionary a once-over!
1. From the Studio, select Tools-Database Builder. This utility creates the CLASS that each datadictionary object [in your entry form] is based on.
2. From the ?Open Table? pulldown, select ?Order Header? and browse thru the settings. It?s extremely impressive I think in the maturity of the product.

Ok, you want to give Visual DataFlex a shot, but where do you go for help?
? The Visual DataFlex newsgroup: The url is: news://news.dataaccess.com/visual-dataflex
? Please introduce yourself as a new developer and we will welcome you with advice and support.

Thanks for giving Visual DataFlex a trial, and look forward to seeing you on the newsgroup!

Sincerely,
Peter A Donovan
www.ApplauseSoftware.Com of Boston, USA.

by tony hopkinson

Most of my work requires a much finer degree of control than this sort of out of the box cookie cutting.

Don't let it's lack of market share worry me?

What do you take me for?

Of course it should worry me!

Both from the point of view of longevity for the product I work on and from that of my own career.

I suggest you change your pitch in that regard, anyone with an ounce of sense is going to boot you straight of the door for that one.

by aikimark

* there is no "versus VB" content. It was all about VDF

* missing premise. it just dives right into marketing pitch.

* misplaced in VB area. Unless VDF provides an automatic migration path from VB classic to the managed world, this post is of no interest/help to VB developers.

* link to the software might be a courtesy and conveience, but it supports my suspicion that this is SPAM.

* Peter should have disclosed, in some introduction, that he has a long time association with the Dsta Flex company.

by peter

Dear aikimark,
Cards On Table:
I would like to start a discussion regarding Data Access Worldwide's product named Visual DataFlex which I approve of and I have been programming custom database applications since 1982.

Note: Spam would be if I owned Data Access Worldwide of Miami. This is hopefully a tech discussion about database Visual Studios.

Personally, I recommend this product after working with it for a good many years because it has come to fruition lately with terrific benefits to the developer.

I would like to set the tone as a developer of custom database applications for 25 years that this is a offer to each reader to try a new development studio which I recommend and spent a great deal of time preparing an invitation and step by step personal introduction to using the studio.

Now, to your comments: My article was subtitled Visual DataFlex Advantages. If I have a longtime association with a language, I feel that this means that I know what I'm talking about. As for the SPAM posting you have made, I would like you to be professional and realize that I am starting a discussion and invitation to try a new development studio, and that I do not benefit personally from you doing so. Lastly, this is not a marketing pitch since I am not a sales representative for DAW or associated in any other way except being a customer/developer who uses their tools.

If a developer of database applications wishes to start a discussion on trying a new product hereto undiscussed, it should be my perrogative to do so without negativity.

Therefore, I would like you to step up to the plate as a professional, make a professional comment, and possibly apologize for spamming my tech discussion which I put a lot of personal time into.

Someone rescue me here!

Sincerely,
Peter A Donovan
Applause Software/Boston

by aikimark

Peter

I don't fault you for your efforts to discuss DataFlex/VDF.

I was bothered to have this categorized with a VB attribute and having VB in the title of the thread. After reading your original post, I felt that both of these factore were misplaced. Your original post was almost ENTIRELY DataFlex/VDF and almost NO VB.

If your intention was to compare VDF with VB (implied by the "vs" in the title, you omitted the VB.

As far as my 'spam' attribution, I use the category for all uninformative/wasteful emails. Your non-transparent association with VDF is similar to the people who send me notices about companies and stocks.

====================

I probably wouldn't have posted my comment...
* if you stated your desire to discuss RAD database products, highlighting your experiences with VDF and qualifications as both VDF developer and trainer.
* if you had included the VB data control, bound controls, validation events, data manager add-in, plethora of supported database types, data form wizard.
* if you had compared solutions or common tasks with both VDF and VB examples.

==================
Professional Experience Note:
Since I served as a judge in the International Software Developers Competitions, I've seen a lot of RAD tools, including DataFlex.

by aaron

The information about VB in this article is either from a very old version, or the author has no knowledge of current technology.

After being a long time VDF developer, I have found that it's actually quicker to develop custom solutions for customers in VB.Net than it is in VDF. There is no need to fight the environment or the language in order to get things done, especially if they require out of the box thinking. Full blown applications that used to take us months to write in VDF now only take a few weeks to complete in VB.Net or C#.

I find it humorous that the best things that VDF has to offer, as pointed out in this article, are also it's biggest shortcomings.

These "find" functions that are outlined are nothing more than old style ADO/RDO rules of function... You have a current record you are looking at and you find the next or the previous by a given field. While it may sound neat, it's actually a hindrance because it's index based. You NEED to have the proper index set up for it to work. This also makes it extremely hard to do things any different, such as completely custom sorting rules. Can't happen in VDF because you are "locked" into their way of doing it. Also, why is using a find next and find previous so important? Most customers would prefer to just search, or go right to what they want. Which brings me to the next topic, look ups.

In VDF, these lookups that are the best thing since sliced bread, again are nothing more than a fancy way to view the data in a tabular format. You can sort by any field, provided you have the right indexes set up. You can filter it, if you custom write the code to do that. Then again, writing any custom code to get around something that is inherent in VDF will give you more headaches than it's really worth, because half the time it won't work the way you really wanted it to.

The comments about object orientation are what baffles me the most... Did you not do any research on VB before you wrote this? Is your experience only with VB 6, which is about 15 years old now? If I can make a sub-class of a windows forms text box and add custom code... If I change that one class and recompile, the change is implemented. Hundreds of hours are not wasted...

Data dictionaries are not the greatest either. Again, you are locked into one way of doing things, and one way only. Try to override it and you are out of luck. You will have hundreds of hours wasted trying to figure it out, only to have it blow up on you in the long run. And frankly, VB.Net does have "data dictionaries" if you really needed something like that... They are called DataSets, and they can have all the custom code you want and it does exactly the same thing, except it's not stuck in a steel box that you can't change like VDF's data dictionaries.

The comment about windows applications and web applications is just silly. That's been available for years. Years before VDF had it available. Again, did you research this at all?

Sorry, I don't buy any of this. We used VDF for 10 years and we are glad it's done in our company. We are much more efficient and our users are much happier with the user interface. No more scrolling data and hitting F keys to "find" the record they need. 16 indexes are no longer needed to be added to the data file just to offer the sorting/searching capabilities that users need.

Did I mention runtime licensing? You forgot to mention that HUGE disadvantage in your article. DataAccess Corporation (developers of VDF), require that you not only pay to use their development environment, but EACH user of your software has to pay a runtime license fee to DataAccess Corporation. VB has never had that requirement, nor will it ever. Free edition? It may be free to use, but take a look at the license agreement. It's hardly free. Check out the Express Editions from Microsoft for all of their development tools. Those ARE free, even for corporations to use for business purposes.

Sorry, but if you need to convert a DOS dataflex system, just do it right the first time and do it in VB.Net.

You did a great job writing a sales pitch, but the research you did on the VB side of it is very very poor and outdated.

by peter

Hi aaron,
Thank you for your intelligent and forthcoming reply. I appreciate it and respond in kind that your Visual DataFlex information is probably based on revisions prior to the current 12.0 release. May I ask what rev you programmed in last? One of the reasons for this article is that VDF has reached a pinacle of achievement with the revisions dating 11.1 and upwards.

First, I would like to state that this article, circulated amongst current Visual DataFlex programmers with a working knowledge of Visual Basic has garnered all sorts of postitive comments agreeing with the information therein.

*Some of the most poignant points have concerned the history of VB as not being backwards compatible and having to rewrite your application from 50% of code to a total rewrite based on the next revision.

*I have researched thru other developers prior to this post, and while I do not want to concentrate on VB yet because this is not my naitive personal base of experience, I would like to state that I feel that your knowledge of Visual DataFlex may possibly be out of date.

Let's explore further into your comments and see what I can respond to:

>>These "find" functions that are outlined are nothing more than old style ADO/RDO rules of function... You have a current record you are looking at and you find the next or the previous by a given field. While it may sound neat, it's actually a hindrance because it's index based. You NEED to have the proper index set up for it to work.<<

[1] The Visual DataFlex brand backend is what the information is about, and this is very accurate. Visual DataFlex has evolved as a language to be completely "platform independent" now, featuring a studio where the same code runs on your choice of backends, whether it be Visual DataFlex (a bit old fashioned), MS-SQL, Oracle, Pervasive SQL, the list goes on.
[2] In additon, since the author has left the Visual DataFlex field, most developers do choose to write SQL commands in Visual DataFlex since (this is a better criticism) the Visual DataFlex brand backend is not client-server. Very minimal code changes, and you've got your app running on a different backend. Please respond as I'd like to hear about VB.Net if you wouldn't mind.
[3] I'd also like to refute the opinion that a serious application can now be coded in VB.Net in the same time as Visual DataFlex. This really isn't possible imho because you simply can't get the level of control over your business rules with *compound simplicity built into datadictionaries that are interconnected.

I'd like to be specific about this point:
Here's a simple DDO-tree for a sales order entry program: (does .Net have ddo trees?).

Vendor Customer
\ /
Product SOHeader
\ /
SOLineItem

*DDO Tree: data dictionary objects instantiated from dd classes for each table residing in each module for augmentation and business rule enforcement. The ddo's talk to the controls, and vice-versa to get their attributes.

In the example above, the SOHeader needs to update the customer data table for [Customer|TotalOwed]]. With datadictionary classes for the table involved this can be very straightforward (as shown) or coded with business rule exceptions right from the studio.
// ** doc: SOHeader Data Dictionary CLASS
Procedure Update
Forward Send Update
Add SOHeader.Total To Customer.TotalOwed
End_Procedure
Procedure Backout
Forward Send Backout
Subtract SOHeader.Total from Customer.TotalOwed
End_Procedure
//
Now, in every module, in every application in the project workspace, this code executes without further coding. Backout happens on existing records|deletions only. Update happens on new records|existing records.

This means that the following code, as programmed will blow the doors off a .NET time comparison: what do you think?

// doc: In the LineItem DD CLASS:
Procedure Update
Add Lineitem.Extended to SOHeader.Total
Subtract Lineitem.Qty from Product.Avail
End_Procedure
Procedure Backout
Subtract Lineitem.Extended from SOHeader.Total
Add Lineitem.Qty to Product.Avail
End_Procedure
//
**RESULTS: (please bear with me)
When you add a new record to the lineitem table, it automatically updates the header, which automatically updates the customer. *If the customer is coded with a cutoff based on reaching their credit limit, the save of the lineitem is disallowed and rolled back.
// doc: code in customer dd CLASS:
Function Validate_Save Returns Integer
// forwarding message details clipped
If (Customer.TotalOwed > Customer.Limit);
Error 900 "Customer Over Credit Limit"
//
(error automatically rolls back the entire op)
**RESULTS:
If you actually CHANGE the product involved in the lineitem to another product, the old previous product is backed-out and the new product is updated.
If you change the Quantity or Price, the entire operation happens again to update.

I'd like to not be too lengthy about this and go for a bit at a time here, so I'll cut off at this point, and see if you'd like to respond, and tomorrow come back and post again.

Hope you see that I agree with you on the backend indexing situation, but feel that given the choice of the two platforms, you cannot possibly equal the power and versatility of the visual dataflex ddo interconnected trees.

I'd also like to invite you to write specific code examples explaining how .net would achieve these results in less time?

Sincerely,
Applause Software/Boston

by aaron

First of all, I think instead of relying on information from other people, you should research and read up on it yourself, because you are getting very bad second hand information... So far, everything you have said is from REALLY old versions. My experience is with (*edit) VDF versions from 6 to 11.1.

As far as backward compatibility is concerned, the only time it has not been backward compatible, is the move from VB6 to VB.Net, in which the whole framework it runs on has changed. Secondly, breaking changes to the underlying framework have been necessary, but few and far between, and well documented. To keep old, outdated code in place for the sake of compatibility is another downfall of VDF. There are reasons why functions, procedures, and type are downgraded and removed.

In VB.Net, you can code against any database system you want. In most instances, if you design it right, you do not need to make any code changes to target other database vendors... However, what's the point? How can you write an efficient application if you have to try to be compatible with everyone? You can't. That's why developers don't, and shouldn't try. For example, there are many new features in SQL Server 2005 that allow more efficient stored procedures to be written and used. Why would you not want to use those? To code for compatibility is just shooting your application in the foot for the sake of pleasing everyone you run across. Not good. VB.Net can access any database vendor, and you can even use MS Access databases if you want to. Heck, you can even use an XML file as your database if you really wanted to.

To say that you can't do something in VB.Net while you are relying on other people's information is just silly... For one, your information is old. Look into the DataSet class in .Net. It does everything you are talking about here, and more. DDO Trees? Please.. They are called constraints and relationships, not a tree, which again, is another downfall of VDF. Try doing some complicated circular relationships with it. You can't unless you want your application to sit spinning it's wheels for days.

And business rules can certainly be coded into the DataSets. No need to rewrite anything in many different areas.

Ok, onto your sample that has a lot of inherent problems anyway.

Here is a sample for you:
Partial Class InvoiceDataSet
Partial Class InvoiceBodyDataTable
Private Sub InvoiceBodyDataTable_InvoiceBodyRowChanged(ByVal sender As Object, ByVal e As InvoiceBodyRowChangeEvent) Handles Me.InvoiceBodyRowChanged
If e.Action = DataRowAction.Add Then
e.Row.InvoiceHeadRow.Total = e.Row.InvoiceHeadRow.Total + (e.Row.Qty * e.Row.Price)
e.Row.InventoryRow.QtyAvail = e.Row.InventoryRow.QtyAvail - e.Row.Qty
End If
End Sub
Private Sub InvoiceBodyDataTable_InvoiceBodyRowDeleted(ByVal sender As Object, ByVal e As InvoiceBodyRowChangeEvent) Handles Me.InvoiceBodyRowDeleted
If e.Action = DataRowAction.Delete Then
e.Row.InvoiceHeadRow.Total = e.Row.InvoiceHeadRow.Total - (e.Row.Qty * e.Row.Price)
e.Row.InventoryRow.QtyAvail = e.Row.InventoryRow.QtyAvail + e.Row.Qty
End If
End Sub
End Class
End Class

All contained in one spot across multiple applications/forms/wherever you want it. And as you can see, you have a ton more control over what exactly is happening with the data. If you need to do something on the change and add, you can do it in one spot. Unlike in VDF where you have to have code not only in the update and backout, but also in the Save_Main_File, Request_Save, etc.

However... Like I said above.. There are some major design flaws with this way of doing things. Why the heck would you have a field in the header record for a total?! This is a serious problem that should be avoided like the plaque. What happens if an update only goes half way on a trip to the database? Wrong total. What happens if the application crashes? Wrong total. That total field should be an expression field that automatically adds up all the line items and just displays that as a read only field... And this can be achieved in the dataset as a formula through the designer. It's never stored in the data table, but always updated and calculated on the fly, WITH NO CODE. Which means, faster development time, less code, and less problems. This might be possible in VDF, but I've never seen anyone do it.

In VB.Net, these datasets are bound to on screen controls, with no code to make it happen. All the inherant rules to the data will apply to the on screen controls, as well as any validation that needs to happen, with no code. We used to do the same thing that VDF allowed, and have people be able to browse through the data record by record if they wanted to, but we found that it was just unnecessary, and actual a complete waste of time. It was much easier to display a lookup that had a grid that can sort, search, and even filter out data on the screen. Oh yea, and they can rearrange the columns themselves.. They can also choose which columns they want to see (that we allow them to see) so if they want to see Name, Address, Phone, and birthdate, for example, but we only show the name and address, they can choose to add those two columns on the fly and also to sort, search, and filter by it. With no code. We didn't have to write anything for any of that.

So to answer your question, no, that code didn't blow the doors off .Net code.

So while we agree on the indexing situation, we still don't agree on the power and versatility of these DDOs, since it's available in .Net... And for your example, really not needed. But I do know that they are needed in places, and we do use them, but just not for things like you gave as an example.

If you really want to learn what VB.Net can and cannot do, I suggest you go download the VB.Net express edition. It's completely free, even for commercial use. It will save you a TON of time.

by aaron

The problem is, VDF has a cult-like following of developers that get "hooked" on VDF some how and then think that it's the best thing since sliced bread. I was lucky in that I had previous in-depth knowledge of other languages before I came to know VDF. In the beginning, it was cool, but as I saw the flaws inherent in their design of this language, it became more apparent that this language was not designed for high level enterprise applications, but more for the business manager/secretaries to be able to custom write themselves a small CRM without having to pay big bucks for a full blown CRM that does way more than they need.

If they would get rid of the stupid runtime licensing, they would snag a lot more of the VB6 developers that refuse to migrate to .Net... but with those additional costs that get passed onto the end-users, it's silly to not just migrate to a runtime that's free.

by tony hopkinson

extensive descriptions, I plan never to do so.

I'm accomplished enough to achieve the same functionality in environments capable of much more. Which in general I need, will need or forsee a future need for more than VDF apparently provides.

Non starter in my opinion, numpty cookie cutting bollocks.

by peter

This is a simple reply:
insulting software engineers based on this kind of arbitrary rudeness is uncalled for and on behalf of any software engineer currently developing in Visual DataFlex: take a hike! Let's step up a knotch and put your code where your mouth is. Patience before posting please.1.2.3.4.5.6.7.8.9.10. Review. Post.

by peter

Code Comparison: not "cutting" it.

Are you saying, and please let me quote you, that this code:

>>
Here is a sample for you:
Partial Class InvoiceDataSet
Partial Class InvoiceBodyDataTable
Private Sub InvoiceBodyDataTable_InvoiceBodyRowChanged(ByVal sender As Object, ByVal e As InvoiceBodyRowChangeEvent) Handles Me.InvoiceBodyRowChanged
If e.Action = DataRowAction.Add Then
e.Row.InvoiceHeadRow.Total = e.Row.InvoiceHeadRow.Total + (e.Row.Qty * e.Row.Price)
e.Row.InventoryRow.QtyAvail = e.Row.InventoryRow.QtyAvail - e.Row.Qty
End If
End Sub
Private Sub InvoiceBodyDataTable_InvoiceBodyRowDeleted(ByVal sender As Object, ByVal e As InvoiceBodyRowChangeEvent) Handles Me.InvoiceBodyRowDeleted
If e.Action = DataRowAction.Delete Then
e.Row.InvoiceHeadRow.Total = e.Row.InvoiceHeadRow.Total - (e.Row.Qty * e.Row.Price)
e.Row.InventoryRow.QtyAvail = e.Row.InventoryRow.QtyAvail + e.Row.Qty
End If
End Sub
End Class
End Class
<<

... and no other omitted code, will

[1] find all existing records (lineitem, product, vendor, customer. salehead, lineitem)
[2] backout the values of all data tables,
[3] update save and all tables including related parents of the lineitem after the backout,
[4] update and backout the product for quantity taken by the sales order,
[5] allow for a change of product by the user on an existing line,
[6] handle all error messages appropriately,
[7] roll back all changes upon error and report it to the user,
[8] support full delegation and be augmentable on both the subclass and object level,
[9] take less time than my fully coded example.
[10] support polymorphism where different data tables morph to act as required parents when used
used as a parent table?

??
Let's examine the code, not the "beef".
PAD.
Patience is a learned attribute.

by aaron

Yes, Peter, it will... No other code is needed, at all. In fact, that was a running example that I did in about 5 minutes, just for this thread.

One thing, your code is not "fully coded"... Remember you have to put your other DDO code in there that is existent in that file.. Do I need to paste that in for you?

The code I posted is COMPLETE, including the partial class that augments the dataset class. Once you design the dataset in the designer, just like you design it in the DataBase Builder in VDF, you write the code into the dataset class (which I included). This code I pasted will do the exact same thing you posted, however that is the complete class and ALL that is needed for that to COMPLETELY work as posted.

1. Yes
2. Yes
3. Yes
4. Yes
5. Yes
6. Yes
7. Yes
8. Yes
9. YES because you never posted full code to begin with, I did.
10. Yes

Let's quit playing games, dude. You need to learn this language before you start trying to compare it to VDF. No matter what you come up with, you can do things in VB.Net that will blow any version of VDF right out of the water. Remember, Data Access has kept VDF 3 - 4 years behind in technology.

Let's cut to the chase.

Can VDF do remoting where you can have an OBJECT reside on a server and then instantiate that object on a client application and call functions on that client PC, but have the function actually run on the server? No. It cannot. And I'm not talking about web services, here. I'm talking about an object, not a web service.

Can VDF support multi-threading natively? No. It cannot, and it never will be able to.

Can VDF run on a hand held device that uses windows mobile? No. It cannot.

Does VDF have the ability to connect directly to a web site via the HTTP protocol in order to perform an HttpPost (natively, without having to use 3rd party ActiveX controls)? No. It cannot.

Can you use TCP listeners/clients directly without having to use an ActiveX control? No. It cannot.

How about using a serial port? Nope.

Everything you do, you must find the ActiveX control that will help it a long. Takes too long. I can do all that with just a few lines of code, and some of it without any code at all.

This is turning more and more into a spam post as I see that you and whoever is helping you with the VB arguments are seriously lacking in any current knowledge. You NEED to know this stuff in order to create a discussion the way you did.

by aaron

How was that rude? Face it, VDF does have a cult-like following. Every developer in it that has had any experience with it will cry foul anytime you put it up against any other language. They think it's the ONLY thing you could ever possibly want to use... And it's just not based in any serious knowledge of anything else on the market.

Peter, I put my code up. I proved it in that one single post. Yet you did the same thing that happens every time someone tries to prove that VDF isn't the best tool out there, you cried foul and said I was wrong. Sorry, but you need to update your knowledge of the language. I can now see that the original post was nothing more than spam and you had no real interest in learning anything about VB.Net. You only wanted to try to persuade non-VDF people that it's awesome, and then you based all of it on out-dated knowledge that was passed onto you second hand.

I'm sorry you took that one comment the wrong way.

by bridings

I began investigating VDF in Version 4. I led project development teams who were trained but not experienced in OOP in 2000. We developed many accounting applications (Ex - a full blown payroll system complete with foolproof security to General Ledger entries in 60 days with most of the time involving tweaking and only 1 very smart developer who had only self-training). Data Dictionaries are extremely easy to set up. In short, if Data Access Worldwide makes a statement about the VDF capabilities, you will find it to be true. It is the best 4GL/5GL system available and is reasonibly priced. I would love to be involved in VDF today.

This discussion is closed to new replies.