TweetFollow Us on Twitter

Lasso Studio Volume Number: 16 (2000)
Issue Number: 8
Column Tag: Tools of the Trade

Lasso Studio for Dreamweaver 1.5

By William Porter

Web database programming for the rest of us?

Introduction

Lasso is a tag-based programming (or, if you prefer, scripting) language used to send instructions to the Lasso Web Data Engine (WDE). The Lasso WDE runs on a web server as a plug-in or CGI, where it is typically used as middleware to enable the web server software to talk to a back-end database such as 4D or FileMaker Pro. While the Lasso language itself is fairly high-level, it is nevertheless a reasonably complex language with hundreds of tags, and the fact that Lasso code gets scattered around in the HTML code of web pages makes writing it and reading it somewhat difficult. Until recently, Lasso developers had no choice but to rely entirely upon text-editors like BBEdit to do their coding. But with the release of the Lasso Studio for Dreamweaver (LS/DW) in December 1999, Lasso developers finally got a graphical interface to work with. And with the version 1.5 update, released in early Spring 2000, the LS/DW is ready for prime time. Lasso hasn't gotten any easier and doing advanced work with Lasso still requires that you get your hands dirty. But building a basic Lasso-powered site is now truly within the reach of non-programmers.

The LS/DW package from Blue World replaces what used to be known as the Lasso Developers Edition. The former Developers Edition was about testing and nothing else. It gave the developer a restricted-use copy of the Lasso Web Data Engine (WDE), so you could web-enable and test your pages on your development machine or demo them for your client. The Lasso Studio for Dreamweaver provides this as well, but it adds a set of extensions for Macromedia's powerful web site design program, Dreamweaver, so you can build Lasso pages right in Dreamweaver, using the Lasso wizards and tag objects as supplements to create pages quickly and with a minimum of direct involvement with the underlying code. What if you don't use Dreamweaver? Then part of the Lasso Studio for Dreamweaver will be a waste of money for you, and you cannot buy the web-enabling part of the Lasso Studio without the Dreamweaver extensions. (Adobe recently announced that GoLive 5 (their web-page editor) will be extensible in the way that Dreamweaver is already. Since the Lasso Studio for Dreamweaver extensions are written in JavaScript, it does not seem unrealistic to hope that Blue World will provide a Lasso Studio for GoLive in the future as well. But Blue World has announced no such plans.)

Like Lasso itself, the Lasso Studio for Dreamweaver does not care much what DBMS it interacts with. Lasso WDE can communicate with 4D, FileMaker Pro and ODBC data sources. For the purpose of this article, we are assuming that the database being published is running under 4D Server.

The Configuration Wizard

Let's imagine that you have kept your used bookstore's inventory in 4D for years and now you want to put the inventory online using the Lasso Studio for Dreamweaver. In order to get started, open the database under 4D Server, crank up the Lasso Web Server and finally, launch Dreamweaver. If everything is properly installed and configured, you'll see a number of new items in the Dreamweaver Commands menu (see Figure 1).


Figure 1.

If you are working on your site for the first time, the Lasso Studio will need to know some things about your database files: their names, the names of the fields, layouts and value-lists in each file. Gathering this information is the job of the Configuration Wizard, which uses Lasso to query the databases and store this information in a "snapshot" file.


Figure 2.

The snapshot file is the key to everything. Without it, you can't work. With it, you don't even have to have 4D or the Lasso Web Server open to create Lasso pages in Dreamweaver. This makes it possible for teams of developers to share snapshot files without actually sharing the databases or needing to have Lasso running on every machine. And if you work on multiple projects, you can create multiple snapshot files, name them, then load the one you need for your current work session.

Considering the importance of the snapshot file, it's unfortunate that the Configuration Wizard, which creates it, is the weakest part of the Lasso Studio. If you want to create different snapshot files for different projects, you'll have no choice but to do that manually, because the Configuration Wizard does not ask you to name the file it creates. More seriously, some users have found it difficult or impossible to use the Wizard with success, although the latest release of the Lasso Studio for Dreamweaver extensions fixed all the problems I myself experienced earlier. It is important to keep in mind that the LS/DW configuration wizard will only work if you have Lasso installed properly installed and configured properly and if your database is properly registered with Lasso security. These are tasks that beginning users - LS/DW's audience - sometimes find confusing. Fortunately, as a last resort, it's possible to create a snapshot "manually," if you have to.

When the configuration wizard is done, it will display the names of all the data sources it found (the names of your open files) and ask you to select one to work with. You can change your selection at any time later on by using the Database Selector dialog (Figure 3).


Figure 3. The Database Selector dialog.

Lasso Studio Basics

The Lasso Studio for Dreamweaver adds four pages to the Dreamweaver objects palette. These contain icons that you can use to insert tags that access data sources, tags that create Lasso forms, tags that rely upon Lasso extensions, and programming tags (like conditions, tokens, file manipulation tags, and others).


Figure 4. The Lasso Form objects.

For example, you can create a one-page Lasso search form using the Lasso Form page of the palette (Figure 4). With a blank document open, click on the "Lasso Form" object to insert a form area. (For some reason, the Lasso Studio will place the form at the top of the editable area regardless of where the insertion point is. You can cut and paste the form where you want it to be if necessary.) When a new form is created, the Lasso Studio automatically inserts a few objects into the form for you: objects that let you define the database to be searched, the layout to be used, and an object that identifies the web page that will display the resulting hit list. When you build a page "manually" this way, you must click on each of those objects and supply a parameter; that is, select the response page object and in the Dreamweaver object properties inspector, enter the name of the .lasso page to be used as your format file (Figure 5).


Figure 5. The response page object shown above has been selected inside the Lasso form, and the parameter required by that tag (the name of the response or format file) is entered in the Dreamweaver object properties inspector.

The icon of the clicking arrow shown as the first tag in Figure 5 is the action tag, which specifies the action to be performed when the user clicks on the submit button. For a search form, that action would be "-search." Like the other Lasso objects in this row on the page, the action object represents a hidden input tag in the HTML. Remember, GUI and WYSIWYG are not synonyms! The Lasso Studio for Dreamweaver provides a graphical-user interface for inputting programming tags, but to an even greater extent than Dreamweaver's own page-editing interface, the Lasso Studio GUI is not WYSIWYG. With any luck, when your site is deployed, what you'll get on most of your Lasso pages is data, and that is one thing you never see when you're working in Dreamweaver.

Anyway, once you have all the hidden input tags the form needs, you just throw in a few search fields (using the same page of the objects palette) and add a submit button at the bottom of the page and you're done-without writing a single line of Lasso code and without ever having to open up Dreamweaver's HTML editor!

The Site Builder

But wait, it gets better. Why build individual pages one tag at a time, when the Lasso Studio can automatically generate all the pages for your entire site? Well, maybe not your entire site, but the Site Builder does build sets of related pages.


Figure 6. The Site Builder's two page-set options.

You start by selecting a "site action" in the Site Builder dialog (Figure 6), and then the Site Builder asks you a series of questions: what fields you want on each page; what field to use as the link-to-detail field on the hitlist page; whether to include a "find all" button on the search page; and so on (Figure 7).


Figure 7. The Lasso Site Builder walks you through the choices you need to make before it can build the page set for you. This screen shot shows the options available for the hitlist page, including (at the bottom) whether the linked detail page should be a display or an update page.

When you get to the end of this interview process, the Lasso Studio performs what many older Lasso users will regard as a nothing less than a minor miracle: it creates an entire set of ready-to-run pages for you, in less than a minute. Once again, you did not have to write a single line of code - and this time you did not even have to type parameters in the object properties inspector. The Lasso Studio for Dreamweaver Site Builder is the star attraction in the package and beginning users will love the Lasso Studio for this feature more than anything else.

Lasso Studio for Dreamweaver 1.5 still has the Form Builder that was introduced in version 1.0. The Form Builder creates single pages and is particularly useful for editing the page sets generated by Site Builder. You can, for example, use the Form Builder to add a new page, then simply tweak the sequence of links in the revised page set.

Together, the Site Builder and the Form Builder allow developers to create a working draft of a basic site very quickly. Of course, the Lasso Studio does not make your pages look good for you., but it does not get in your way, either. When you use the Site Builder, you can tell it to use a Dreamweaver template and what editable region of that template to insert the Lasso code into, so elements like site headers and common menus can be placed directly into the Lasso pages by the Site Builder.

Beyond the Basics

Yes, there is a catch. The Site Builder does what it does and that's all that it does. For everything else, you're on your own with the Lasso Reference Manual. Working with Lasso remains a form of programming, and especially if you want to go beyond the basics, you will need to understand Lasso's programming logic, because the GUI requires that you know not just what tags (objects) to insert, but also what parameters to add to tags, and in what order to insert tags. And ironically, when you know enough to do it using the Lasso Studio's GUI, you know enough to do it without, so the advantages of the GUI seem less clear. Advanced developers may even feel that using the GUI is more trouble than working with the code directly.

One of the places where this limitation is most evident is in the way the Lasso Studio handles inline tags. Inline tags are placed within the format file that displays their results and they are processed before the page is displayed. For this reason, they are never seen by end users, either in the browser's location field or in the source code window. So, for example, you might create a page named "list_everything.lasso" which includes this inline:

[inline: datasource='Books.4D', table='books', keyfield='ID', sortfield='author_last', findall]

   [records]
      [field:'author_last'], [field:'author_first']: <i>[field:'title']</i>
   [/records]

[/inline]

This simple code will find all the records in the database "Books.4D," sort them by the author's name, and display a hit list showing two fields, "author" and "title." Best of all, no information about your databases will be revealed in the source code for the page. Most advanced Lasso developers prefer to use inlines as much as possible. Yet Blue World does not promote their use energetically. The Lasso Studio wizards create page sets exclusively using the traditional tag types. If you prefer to use inlines, then the Lasso Studio for Dreamweaver's strongest feature - the Site Builder - will be wasted on you. And creating an inline in the Lasso Studio is, in my opinion, more difficult than it is to type the same code into the HTML editor by hand. Here is the inline inspector used to create the same tag that was shown on the previous page:


Figure 8. The Lasso Tag Editor, being used to create an inline tag.

The down side to inlines is that they are somewhat more complicated conceptually than traditional tags. Processing an add or search form using an inline in the response page rather than hidden input tags in the form page itself requires careful use of the [form_param] tag at a minimum, and in some cases can require the use of tokens to pass data from one page to the next.

In some cases, you simply cannot use the Lasso objects to insert code and must type it in manually. For example, it is common to use form parameters or tokens or cookies in links that conduct searches:

<a 
href="action.lasso?-datasource=Books.4D&-response=viewcart.lasso&-table=books&customer_I
=[token_value:'customer_id']&-search]">Click here to view the items in your shopping cart</a>

That link tells Lasso to go to the layout "web" in the database "items" and find all the items that have been selected for purchase by this customer, based on the value of the token "customer_id." Now there is a Lasso token object in the objects palette. But you cannot insert an object-Lasso object or other kind of object-into the object inspector's link field. And since the link field is so small, you will almost certainly want to type that tag into your HTML editor instead.

Availability and Pricing

The Lasso Studio for Dreamweaver provides you, the developer, with two things: (1) a testing-only version of the Lasso Web Data Engine, with all the data-source modules (4D, FileMaker Pro and ODBC), and (2) the extensions for Dreamweaver. You must supply the databases and your own copy of Dreamweaver 3.01. A thirty-day evaluation version of the Lasso Studio for Dreamweaver can be downloaded from Blue World's web site: http://www.blueworld.com/download/. The Lasso Studio for Dreamweaver can be purchased directly from Blue World Communications. As of mid-summer 2000, the boxed version (with CDs and printed manuals) has a list price of $349; the electronic (downloaded) version is priced at $299.

Conclusion

On balance, version 1.5 of the Lasso Studio for Dreamweaver is a winner. The Lasso Site Builder is a godsend for beginners and a time-saver even for experienced developers. As we have seen, its difficult or impossible to do everything using the Dreamweaver GUI, and Hardhard-boiled Lasso coders may will not want to give up their favorite text editor, . but But I thought of myself as at least a medium-boiled coder, and I have learned that I can use BBEdit and the Lasso Studio for Dreamweaver side-by-side to very good effect.

William Porter, Ph.D., is the owner of Polytrope Solutions, a database development firm in Houston, Texas, specializing in 4D, FileMaker Pro and Lasso projects. You can write him at wporter@polytrope.com.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Top Hat Studios unveils a new gameplay t...
There are a lot of big games coming that you might be excited about, but one of those I am most interested in is Athenian Rhapsody because it looks delightfully silly. The developers behind this project, the rather fancy-sounding Top Hat Studios,... | Read more »
Bound through time on the hunt for sneak...
Have you ever sat down and wondered what would happen if Dr Who and Sherlock Holmes went on an adventure? Well, besides probably being the best mash-up of English fiction, you'd get the Hidden Through Time series, and now Rogueside has announced... | Read more »
The secrets of Penacony might soon come...
Version 2.2 of Honkai: Star Rail is on the horizon and brings the culmination of the Penacony adventure after quite the escalation in the latest story quests. To help you through this new expansion is the introduction of two powerful new... | Read more »
The Legend of Heroes: Trails of Cold Ste...
I adore game series that have connecting lore and stories, which of course means the Legend of Heroes is very dear to me, Trails lore has been building for two decades. Excitedly, the next stage is upon us as Userjoy has announced the upcoming... | Read more »
Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »

Price Scanner via MacPrices.net

Save $300 at Apple on 14-inch M3 MacBook Pros...
Apple has 14″ M3 MacBook Pros with 16GB of RAM, Certified Refurbished, available for $270-$300 off MSRP. Each model features a new outer case, shipping is free, and an Apple 1-year warranty is... Read more
Apple continues to offer 14-inch M3 MacBook P...
Apple has 14″ M3 MacBook Pros, Certified Refurbished, available starting at only $1359 and ranging up to $270 off MSRP. Each model features a new outer case, shipping is free, and an Apple 1-year... Read more
Apple AirPods Pro with USB-C return to all-ti...
Amazon has Apple’s AirPods Pro with USB-C in stock and on sale for $179.99 including free shipping. Their price is $70 (28%) off MSRP, and it’s currently the lowest price available for new AirPods... Read more
Apple Magic Keyboards for iPads are on sale f...
Amazon has Apple Magic Keyboards for iPads on sale today for up to $70 off MSRP, shipping included: – Magic Keyboard for 10th-generation Apple iPad: $199, save $50 – Magic Keyboard for 11″ iPad Pro/... Read more
Apple’s 13-inch M2 MacBook Airs return to rec...
Apple retailers have 13″ MacBook Airs with M2 CPUs in stock and on sale this weekend starting at only $849 in Space Gray, Silver, Starlight, and Midnight colors. These are the lowest prices currently... Read more
Best Buy is clearing out iPad Airs for up to...
In advance of next week’s probably release of new and updated iPad Airs, Best Buy has 10.9″ M1 WiFi iPad Airs on record-low sale prices for up to $200 off Apple’s MSRP, starting at $399. Sale prices... Read more
Every version of Apple Pencil is on sale toda...
Best Buy has all Apple Pencils on sale today for $79, ranging up to 39% off MSRP for some models. Sale prices for online orders only, in-store prices may vary. Order online and choose free shipping... Read more
Sunday Sale: Apple Studio Display with Standa...
Amazon has the standard-glass Apple Studio Display on sale for $300 off MSRP for a limited time. Shipping is free: – Studio Display (Standard glass): $1299.97 $300 off MSRP For the latest prices and... Read more
Apple is offering significant discounts on 16...
Apple has a full line of 16″ M3 Pro and M3 Max MacBook Pros available, Certified Refurbished, starting at $2119 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free... Read more
Apple HomePods on sale for $30-$50 off MSRP t...
Best Buy is offering a $30-$50 discount on Apple HomePods this weekend on their online store. The HomePod mini is on sale for $69.99, $30 off MSRP, while Best Buy has the full-size HomePod on sale... Read more

Jobs Board

*Apple* App Developer - Datrose (United Stat...
…year experiencein programming and have computer knowledge with SWIFT. Job Responsibilites: Apple App Developer is expected to support essential tasks for the RxASL Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
*Apple* Software Engineer - HP Inc. (United...
…Mobile, Windows and Mac applications. We are seeking a high energy Senior Apple mobile engineer who can lead and drive application development while also enabling Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.