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 Mobile Game Discounts
Every day, we pick out a curated list of the best mobile discounts on the App Store and post them here. This list won't be comprehensive, but it every game on it is recommended. Feel free to check out the coverage we did on them in the links... | Read more »
Price of Glory unleashes its 1.4 Alpha u...
As much as we all probably dislike Maths as a subject, we do have to hand it to geometry for giving us the good old Hexgrid, home of some of the best strategy games. One such example, Price of Glory, has dropped its 1.4 Alpha update, stocked full... | Read more »
The SLC 2025 kicks off this month to cro...
Ever since the Solo Leveling: Arise Championship 2025 was announced, I have been looking forward to it. The promotional clip they released a month or two back showed crowds going absolutely nuts for the previous competitions, so imagine the... | Read more »
Dive into some early Magicpunk fun as Cr...
Excellent news for fans of steampunk and magic; the Precursor Test for Magicpunk MMORPG Crystal of Atlan opens today. This rather fancy way of saying beta test will remain open until March 5th and is available for PC - boo - and Android devices -... | Read more »
Prepare to get your mind melted as Evang...
If you are a fan of sci-fi shooters and incredibly weird, mind-bending anime series, then you are in for a treat, as Goddess of Victory: Nikke is gearing up for its second collaboration with Evangelion. We were also treated to an upcoming... | Read more »
Square Enix gives with one hand and slap...
We have something of a mixed bag coming over from Square Enix HQ today. Two of their mobile games are revelling in life with new events keeping them alive, whilst another has been thrown onto the ever-growing discard pile Square is building. I... | Read more »
Let the world burn as you have some fest...
It is time to leave the world burning once again as you take a much-needed break from that whole “hero” lark and enjoy some celebrations in Genshin Impact. Version 5.4, Moonlight Amidst Dreams, will see you in Inazuma to attend the Mikawa Flower... | Read more »
Full Moon Over the Abyssal Sea lands on...
Aether Gazer has announced its latest major update, and it is one of the loveliest event names I have ever heard. Full Moon Over the Abyssal Sea is an amazing name, and it comes loaded with two side stories, a new S-grade Modifier, and some fancy... | Read more »
Open your own eatery for all the forest...
Very important question; when you read the title Zoo Restaurant, do you also immediately think of running a restaurant in which you cook Zoo animals as the course? I will just assume yes. Anyway, come June 23rd we will all be able to start up our... | Read more »
Crystal of Atlan opens registration for...
Nuverse was prominently featured in the last month for all the wrong reasons with the USA TikTok debacle, but now it is putting all that behind it and preparing for the Crystal of Atlan beta test. Taking place between February 18th and March 5th,... | Read more »

Price Scanner via MacPrices.net

AT&T is offering a 65% discount on the ne...
AT&T is offering the new iPhone 16e for up to 65% off their monthly finance fee with 36-months of service. No trade-in is required. Discount is applied via monthly bill credits over the 36 month... Read more
Use this code to get a free iPhone 13 at Visi...
For a limited time, use code SWEETDEAL to get a free 128GB iPhone 13 Visible, Verizon’s low-cost wireless cell service, Visible. Deal is valid when you purchase the Visible+ annual plan. Free... Read more
M4 Mac minis on sale for $50-$80 off MSRP at...
B&H Photo has M4 Mac minis in stock and on sale right now for $50 to $80 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses: – M4 Mac mini (16GB/256GB): $549, $50 off... Read more
Buy an iPhone 16 at Boost Mobile and get one...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering one year of free Unlimited service with the purchase of any iPhone 16. Purchase the iPhone at standard MSRP, and then choose... Read more
Get an iPhone 15 for only $299 at Boost Mobil...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering the 128GB iPhone 15 for $299.99 including service with their Unlimited Premium plan (50GB of premium data, $60/month), or $20... Read more
Unreal Mobile is offering $100 off any new iP...
Unreal Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering a $100 discount on any new iPhone with service. This includes new iPhone 16 models as well as iPhone 15, 14, 13, and SE... Read more
Apple drops prices on clearance iPhone 14 mod...
With today’s introduction of the new iPhone 16e, Apple has discontinued the iPhone 14, 14 Pro, and SE. In response, Apple has dropped prices on unlocked, Certified Refurbished, iPhone 14 models to a... Read more
B&H has 16-inch M4 Max MacBook Pros on sa...
B&H Photo is offering a $360-$410 discount on new 16-inch MacBook Pros with M4 Max CPUs right now. B&H offers free 1-2 day shipping to most US addresses: – 16″ M4 Max MacBook Pro (36GB/1TB/... Read more
Amazon is offering a $100 discount on the M4...
Amazon has the M4 Pro Mac mini discounted $100 off MSRP right now. Shipping is free. Their price is the lowest currently available for this popular mini: – Mac mini M4 Pro (24GB/512GB): $1299, $100... Read more
B&H continues to offer $150-$220 discount...
B&H Photo has 14-inch M4 MacBook Pros on sale for $150-$220 off MSRP. B&H offers free 1-2 day shipping to most US addresses: – 14″ M4 MacBook Pro (16GB/512GB): $1449, $150 off MSRP – 14″ M4... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.