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

Dropbox 193.4.5594 - Cloud backup and sy...
Dropbox is a file hosting service that provides cloud storage, file synchronization, personal cloud, and client software. It is a modern workspace that allows you to get to all of your files, manage... Read more
Google Chrome 122.0.6261.57 - Modern and...
Google Chrome is a Web browser by Google, created to be a modern platform for Web pages and applications. It utilizes very fast loading of Web pages and has a V8 engine, which is a custom built... Read more
Skype 8.113.0.210 - Voice-over-internet...
Skype is a telecommunications app that provides HD video calls, instant messaging, calling to any phone number or landline, and Skype for Business for productive cooperation on the projects. This... Read more
Tor Browser 13.0.10 - Anonymize Web brow...
Using Tor Browser you can protect yourself against tracking, surveillance, and censorship. Tor was originally designed, implemented, and deployed as a third-generation onion-routing project of the U.... Read more
Deeper 3.0.4 - Enable hidden features in...
Deeper is a personalization utility for macOS which allows you to enable and disable the hidden functions of the Finder, Dock, QuickTime, Safari, iTunes, login window, Spotlight, and many of Apple's... Read more
OnyX 4.5.5 - Maintenance and optimizatio...
OnyX is a multifunction utility that you can use to verify the startup disk and the structure of its system files, to run miscellaneous maintenance and cleaning tasks, to configure parameters in the... Read more
Hopper Disassembler 5.14.1 - Binary disa...
Hopper Disassembler is a binary disassembler, decompiler, and debugger for 32- and 64-bit executables. It will let you disassemble any binary you want, and provide you all the information about its... Read more

Latest Forum Discussions

See All

Zenless Zone Zero opens entries for its...
miHoYo, aka HoYoverse, has become such a big name in mobile gaming that it's hard to believe that arguably their flagship title, Genshin Impact, is only three and a half years old. Now, they continue the road to the next title in their world, with... | Read more »
Live, Playdate, Live! – The TouchArcade...
In this week’s episode of The TouchArcade Show we kick things off by talking about all the games I splurged on during the recent Playdate Catalog one-year anniversary sale, including the new Lucas Pope jam Mars After Midnight. We haven’t played any... | Read more »
TouchArcade Game of the Week: ‘Vroomies’
So here’s a thing: Vroomies from developer Alex Taber aka Unordered Games is the Game of the Week! Except… Vroomies came out an entire month ago. It wasn’t on my radar until this week, which is why I included it in our weekly new games round-up, but... | Read more »
SwitchArcade Round-Up: ‘MLB The Show 24’...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for March 15th, 2024. We’re closing out the week with a bunch of new games, with Sony’s baseball franchise MLB The Show up to bat yet again. There are several other interesting games to... | Read more »
Steam Deck Weekly: WWE 2K24 and Summerho...
Welcome to this week’s edition of the Steam Deck Weekly. The busy season has begun with games we’ve been looking forward to playing including Dragon’s Dogma 2, Horizon Forbidden West Complete Edition, and also console exclusives like Rise of the... | Read more »
Steam Spring Sale 2024 – The 10 Best Ste...
The Steam Spring Sale 2024 began last night, and while it isn’t as big of a deal as say the Steam Winter Sale, you may as well take advantage of it to save money on some games you were planning to buy. I obviously recommend checking out your own... | Read more »
New ‘SaGa Emerald Beyond’ Gameplay Showc...
Last month, Square Enix posted a Let’s Play video featuring SaGa Localization Director Neil Broadley who showcased the worlds, companions, and more from the upcoming and highly-anticipated RPG SaGa Emerald Beyond. | Read more »
Choose Your Side in the Latest ‘Marvel S...
Last month, Marvel Snap (Free) held its very first “imbalance" event in honor of Valentine’s Day. For a limited time, certain well-known couples were given special boosts when conditions were right. It must have gone over well, because we’ve got a... | Read more »
Warframe welcomes the arrival of a new s...
As a Warframe player one of the best things about it launching on iOS, despite it being arguably the best way to play the game if you have a controller, is that I can now be paid to talk about it. To whit, we are gearing up to receive the first... | Read more »
Apple Arcade Weekly Round-Up: Updates an...
Following the new releases earlier in the month and April 2024’s games being revealed by Apple, this week has seen some notable game updates and events go live for Apple Arcade. What The Golf? has an April Fool’s Day celebration event going live “... | Read more »

Price Scanner via MacPrices.net

Apple Education is offering $100 discounts on...
If you’re a student, teacher, or staff member at any educational institution, you can use your .edu email address when ordering at Apple Education to take $100 off the price of a new M3 MacBook Air.... Read more
Apple Watch Ultra 2 with Blood Oxygen feature...
Best Buy is offering Apple Watch Ultra 2 models for $50 off MSRP on their online store this week. Sale prices available for online orders only, in-store prices may vary. Order online, and choose... Read more
New promo at Sams Club: Apple HomePods for $2...
Sams Club has Apple HomePods on sale for $259 through March 31, 2024. Their price is $40 off Apple’s MSRP, and both Space Gray and White colors are available. Sale price is for online orders only, in... Read more
Get Apple’s 2nd generation Apple Pencil for $...
Apple’s Pencil (2nd generation) works with the 12″ iPad Pro (3rd, 4th, 5th, and 6th generation), 11″ iPad Pro (1st, 2nd, 3rd, and 4th generation), iPad Air (4th and 5th generation), and iPad mini (... Read more
10th generation Apple iPads on sale for $100...
Best Buy has Apple’s 10th-generation WiFi iPads back on sale for $100 off MSRP on their online store, starting at only $349. With the discount, Best Buy’s prices are the lowest currently available... Read more
iPad Airs on sale again starting at $449 on B...
Best Buy has 10.9″ M1 WiFi iPad Airs on record-low sale prices again for $150 off Apple’s MSRP, starting at $449. Sale prices for online orders only, in-store price may vary. Order online, and choose... Read more
Best Buy is blowing out clearance 13-inch M1...
Best Buy is blowing out clearance Apple 13″ M1 MacBook Airs this weekend for only $649.99, or $350 off Apple’s original MSRP. Sale prices for online orders only, in-store prices may vary. Order... Read more
Low price alert! You can now get a 13-inch M1...
Walmart has, for the first time, begun offering new Apple MacBooks for sale on their online store, albeit clearance previous-generation models. They now have the 13″ M1 MacBook Air (8GB RAM, 256GB... Read more
Best Apple MacBook deal this weekend: Get the...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more
New 15-inch M3 MacBook Air (Midnight) on sale...
Amazon has the new 15″ M3 MacBook Air (8GB RAM/256GB SSD/Midnight) in stock and on sale today for $1249.99 including free shipping. Their price is $50 off MSRP, and it’s the lowest price currently... Read more

Jobs Board

Early Preschool Teacher - Glenda Drive/ *Appl...
Early Preschool Teacher - Glenda Drive/ Apple ValleyTeacher Share by Email Share on LinkedIn Share on Twitter Read more
Senior Software Engineer - *Apple* Fundamen...
…center of Microsoft's efforts to empower our users to do more. The Apple Fundamentals team focused on defining and improving the end-to-end developer experience in Read more
Relationship Banker *Apple* Valley Main - W...
…Alcohol Policy to learn more. **Company:** WELLS FARGO BANK **Req Number:** R-350696 **Updated:** Mon Mar 11 00:00:00 UTC 2024 **Location:** APPLE VALLEY,California Read more
Medical Assistant - Surgical Oncology- *Apple...
Medical Assistant - Surgical Oncology- Apple Hill WellSpan Medical Group, York, PA | Nursing | Nursing Support | FTE: 1 | Regular | Tracking Code: 200555 Apply Now Read more
Early Preschool Teacher - Glenda Drive/ *Appl...
Early Preschool Teacher - Glenda Drive/ Apple ValleyTeacher Share by Email Share on LinkedIn Share on Twitter Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.