Ben Langhinrichs

January, 2006
SMTWTFS
01 02 03 04 05 06 07
08 09 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

Search the weblog





























Genii Weblog


Civility in critiquing the ideas of others is no vice. Rudeness in defending your own ideas is no virtue.


Tue 31 Jan 2006, 11:51 AM
Rich Text 101 logo

I have long considered doing an article on layers, but it is a pretty tricky subject, and I was afraid I could not do it justice.  After working with layers again for the Lotusphere 2006 Sessions database, I decided that while I may not know everything there is to know about layers, there are a lot of people who know much less.  Thus, I'll at least start the topic and see if anybody else has additions and modifications they would like to see.  If I find out more information, I'll be sure to modify this article.

Overview
Layers are positional elements which were added in Notes/Domino 6 as a rich text construct to replace navigators, and to match the web browser concept of positional DIVs.  While the Domino Designer only allows the creation of layers in design elements such as forms, subforms and pages, they, like most rich text constructs, can be used in any document as well.  As the name implies, besides the ability to absolutely or relatively position and element (sort of like a floating table cell), you can also layer different elements on top of each other.  Since layers can be transparent, you can place one layer on top of another, and even click on hotspots and such through the layer.

A simple example comes from the Lotusphere 2006 Sessions database mentioned above.  This partial screenshot shows the outer layer, which has a graphic background containing the grip and rooms and times, and the child layers which show the rooms and sessions scheduled.  The entire layer is displayed in one tab of a tabbed table.



While none of these layers are transparent, you can see that the session layers sit on top of the outer layer and are absolutely positioned.

Creating a layer
Creating a layer is fairly simple, although working with multiple layers can be quite complex.  From the design of a form, subform or page, use the CreateLayer menu item to create a default sized layer with transparent background.  You may move it around or resize it with the mouse, but you can also adjust the properties, as described below.  Note that the position of the cursor when the layer is created determines where the layer anchor is placed.  The layer anchor is important for a variety of reasons, including the following:
  • A layer that is positioned with relative positioning will be relative to the layer anchor.
  • A layer anchor that is contained within another layer is considered a child layer for the purposes of this article and for the layer tree.
  • The hide-when formula for the paragraph containing the layer anchor controls whether the entire layer is hidden or not.
  • A layer anchor inside a collapsed section or on a tabbed tab on a tab that is not displayed will be hidden as well.


The properties on the first tab of the layer properties effect the position and size of the layer.  In addition, the Z-Index is a special value that effects which layers are on top of which others.  If you think of the X and Y coordinates as specifying where the layer is in a two dimensional plane, the Z coordinate is where the two dimensional plane lies in a three dimensional view.  Odd, when you consider that the screen is two dimensional, so if you do not quite get the mathematical concept, just think of it as which layer is on top of which other layers.  A higher Z-Index covers a lower Z-Index, so 0 is usually the bottom layer, although the Domino Designer does allow negative Z-Index values.



All four of the positional values can be measured in various units, as shown below.  Pixels, inches and percents are fairly self explanatory, while ems are defined on the web as "relative to the font-size of the element". but which in Notes seem to use as a straight multiple of the pixels.  The "Auto" value is a special value which implies something different.  If the Top and Left values are set to "Auto", the layer is positioned relative to the cursor position where the layer anchor is created.  If the Width or Height are set to "Auto", the layer will be sided to fit the content, although the Height seems to do that regardless.



The properties on the second tab of the layer properties effect the background color and/or graphic.  While these are very straightforward, there are a few things to think about.  First, if you set a background color, your layer is not transparent at all, so don't use it unless you want the layer to cover the underlying content, whether it not the underlying content is on a layer.  Second, while on a table a background graphic is your only real choice, on a layer you can equally well use a graphic imported onto the layer.  If you do that, you can resize the layer to meet the exact dimensions of the image (use pixels!).  You can also use image hotspots on the image.  On the other hand, if you are going to use the exact same image on twenty different layers, you might want to use an image resource.  The image resource can be computed, which allows some cool dynamic effects.



Putting layers on a document instead of a design element
While the Domino Designer only allows you to create and manipulate layers in a design element, it is easy to put layers on a document.  This can lead to a very powerful demonstration in a discussion database, for example.  The basic approach is to get the layers working just as you want them in a blank form (no fields allowed), then copy the whole field contents (usually using CTRL-A to select all) and pasting into the document.  If the layer Top and Left positional properties have been set to "Auto", this will position itself after the text in the paragraph you were writing, or it can be added to a table.  Remember that the layer can easily exceed the boundaries of the containing object, so a table cell won't expand to contain the layer.

Hiding a layer
To really get the benefit of a layered approach, you need to be able to hide the layer at times.  There are several ways to hide a layer, and the different approaches lend themselves to different applications.  Here are some of the ways:
  1. Cover the layer with another non-transparent layer.  You can cover the layer by having another layer with a higher Z-Index value, or by having another layer whose layer anchor that is after the first layer's layer anchor with the same Z-Index value.  The former approach is more reliable, as it is documented and will continue in the future and in different interfaces, such as Notes and the Web.
  2. Add a hide-when formula or hide-when flags on the paragraph containing the layer anchor.  This can work well with hotspot actions that set a field value and then use @Command([RefreshHideFormulas]) to hide or reveal the layer without closing and opening the document (in Notes).  This will also work with a combo box that refreshes automatically on change (see below for example).
  3. Put the layer anchor in a collapsed section.  When the section is expanded, the layer appears.  When it is collapsed, it disappears.  Again, this works in the Notes client without having to close and re-open.
  4. Put the layer anchor in a tabbed table.  When the tab is selected, the layer appears.  When a different tab is selected, the layer disappears.  Like sections, this works without a close and open of the document.
  5. Put the coordinates of the layer off the screen entirely.  This is generally not a good idea, but can be done in certain circumstances by using negative Top and Left positional values.


Hiding the contents of a layer
It is important to remember that a layer is just a container for rich text, like a table cell or collapsible section.  It starts with a paragraph, and can have hide-when formulas on this or subsequent paragraphs.  Therefore, you can have a single layer with multiple paragraphs and different hide-when formulas, and change the displayed value by changing a field value or other condition of the hide formula and then using @Command([RefreshHideFormulas]) to change what is shown and what is hidden.

Dynamic content in Notes and on the Web
Taking the various ways of hiding and displaying layered content, it is possible to make a very dynamic layered application.  When the Domino Designer is opened in either ND6/6.5 or ND7, the first thing which appears is a layered view of the object model for programming in Notes/Domino.  A drop down combo box is used to select which view to show, and the refresh on field change refreshes the hide-when formulas.  Link hotspots on the images of the various object models are used to go to those topics in the Help database.  Similarly, in the Lotusphere 2006 Sessions database, (as shown above), mouseover hotspots were use to display additional information about the specific content.

Differences in Notes/Web use layers   
The rendering of layers is very good and very fast, much faster than tables, in both the Notes client and in Web browsers, but the use of layers has some differences.  While hide-when formulas and tabbed tables and sections that hide and display layers all work from the web, all require a round trip from the server and a refresh of the page, which makes those techniques much clunkier (to use a technical term).  On the web, a better approach is to hide JavaScript to either change the Z-Index (which is the "zindex" property of the DIV which creates the layer) or change the "display" property to hide the layer.  Unfortunately, the JavaScript model does not extend to layer in the Notes client, as these would be very powerful ways to interact with layers from the Notes client as well.  Perhaps in Hannover.  For the moment, this is one of the great shortcomings of the layers implementation in Notes/Domino, but it should not stop you from creating the application you want in either client.

Related Posts
For information on layers used in the Lotusphere Sessions databases, see Ogres have layers, and now the Sessions database does as well or simply search for layers in the weblog.
For a demonstration of scatter graphs using layers, see Scatter Graphs using Layers and Rich Text 101 - Text.
For a Mike Midas case study involving layers (a bit more fun), see Veiled Threats

Copyright © 2006 Genii Software Ltd.

Technorati tags:

Sun 29 Jan 2006, 06:58 AM
About a year ago, I started maintaining the Web Editors page to supply a relatively up-to-date list of WYSIWYG rich text web editors that can be used in a web page for editing, also known as "through the web" editors.  The list is separated into "open source" and "commercial" editors.  It has become one of the most heavily hit pages on our web site, despite having little to do with our software.  I have always encouraged feedback on the page, and have gotten many more notes from users and vendors recently, so there are several new editors listed. including CuteEditor for .netWhizzywig and widgEditor.  One has been de-listed at the request of the provider, who no longer sells it.

One sign of the popularity of the page, which mostly seems popular because it is not many years out of date, is the results of a search for "WYSIWYG editors" on Google (edited slightly to remove sponsored links and shift to fit in smaller image):

Results of search for WYSIWYG editors

Another sign is that until recently, our list was top of the search for "Through the web", "web editors" and third on the list for "WYSIWYG", but that various vendors have been working really hard to get ahead of our page.  Pretty funny for a free resource page to be such competition.

Copyright © 2006 Genii Software Ltd.

Sat 28 Jan 2006, 03:35 PM
Now, if I had only put out Version 3...  Anyway, thanks to all those in Penumbra who assisted and all those in Orlando who told me they enjoyed it.

Copyright © 2006 Genii Software Ltd.

Fri 27 Jan 2006, 06:36 PM
I have been to a lot of Lotusphere's, and I always try to find some way to make it fresh.  In the early years, I went to sessions, in the middle years I spoke at sessions, and in recent years, I have avoided sessions like the plague.  Having tried all of those things, I thought it was about time Genii Software had our own pedestal, so what I did was stand at the pedestal and talk to people and listen to people... and talk to people and listen to people... and talk hoarsely to people and listen to people.  Well, you get the picture.  It was wonderful and exhilarating in some ways, and supremely frustrating in others.  In recent years, besides avoiding sessions, I have tried to hard to take the pulse of the our community and industry and have gotten some great product and feature ideas, and have also met a lot of people with varied interests.

But being on the Product Showcase is different.  Certainly, you meet very interesting people, and hear lots of interesting ideas, but there is a different hum, and the ideas are different.  I'll get to that.

Outside the Product Showcase, the "coins of the realm" at a conference like Lotusphere are contacts and information.  Who do you know and what do they know?  The least well connected get information exclusively at sessions, and their barter with others is primarily a barter of which session they made it to and what trick or technique or concept they learned or just now understand.  For these people, the information currency comes in three and four letter acronyms: RAD, AJAX, DXL, J2EE, XML, IIOP, etc.

Understanding that better this year, I also understand better why I have avoided sessions in recent years.  The better connected get information by chumming up with Ed Brill, or making friends within the developers at the Meet the Developer's Lab and having drinks with them after hours, or scoring an invite to the Penumbra dinner and rubbing elbows with IBM muckamucks, or talking with people who went to IBM's Software University internal conference last week and heard some less filtered information,or, scary as it seems, finding people like me or Andrew Pollack or Richard Schwartz or John Head, who just seem to "know things", and finding out the scuttlebutt about emerging technologies.  Though the information exchanged might be less certain or verified, it might be a lot more important to your career goals or strategic direction.  The information in sessions is almost entirely tactical, and so of less value in this information currency exchange.  On the other hand, social networking is key.

Having very gradually moved from those in the hunt to those in the know over the past few years, it was somewhat startling to be on the Product Showcase floor.  At first, even with all the activity and potential customers and noise, I missed the information flow.  I barely heard about Sametime 7.5, missed all the Hannover demos, didn't get to hear first hand about the shifting priorities at IBM.  Also, for a while, it was hard to understand the new currency of exchange.

On the Product Showcase floor, the "coins of the realm" are both more obvious and deceptive.  The most common currency is tchotchkes, the little throw away blinking and flashing and colorful items that most vendors have to entice passersby to stop and listen to the spiel.  They are, by and large, worthless and disposable, and people seldom want them for much more than gifts to placate those kids left at home who don't get to go to Disneyworld in January.  The next most common currency is the t-shirt, and especially the ubiquitous and iconic C.U.L.T. shirt.  Again, this is enticement almost as worthy as the "booth babes" who hand them out.  [Aside: as a liberal and feminist and semi-enlightened person, I am appalled as could be at both the term and the concept of trawling for business by putting pretty young ladies out as bait.  As a capitalist, I was certainly glad that Granite Software, with whom I share both product sales for CoexLinks and a long friendship, had thought to invite Abby along, as she attracted lots of would be customers.  Finally, as a matter of interest, I talked to my daughter, who is about Abby's age and even more flaming liberal and feminist than I, and she said she would love to be a "booth babe".  Go figure!  I guess, when in Rome, sell what the Romans want]

So, what is deceptive about these apparent "coins of the realm", t-shirts and tchotchkes?  It is somewhat like looking at early North American history and the native Americans and falling for the apparent currencies of shells and beads and pretty trinkets.  Only one side of the transaction actually thought they were worth something.  The other side had a different assumption.  On the Product Showcase floor, the real currency for those people is contact information.  Scanning badges is crucial, but scoring business cards is even better.  Contact information mean potential sales, so everybody wants to scan everybody else, and there are quite a few companies that even exchange these contacts in another form of Lotusphere barter.

But even then, many are deceived.  Like those out in Lotusphere scurrying from session to session, trying to glean enough information to barter with colleagues and others, and even those who search for the well connected, many miss the real point.  The real currency of the Product Showcase floor is information, just like at the rest of the conference, but the information is quite different.  Instead of product direction or emerging technologies, the information is very simple.  It is all about supply and demand.  What can we, the vendors, supply, and what do they, the customers, demand or need?  It all comes down to a customer or customer representative, such as IGS or an integrator, saying "I have this need.  Do you have a product to fill the need?" or the vendor saying "I have this product.  Do you have the pain this will ease?"  In that moment, if there is a match up, the sale is really made.  The customer will go back home and start the evaluation process, and the vendor will go home happy that he or she has connected.  Unlike the random scans, which as unlikely to really reach anybody, or the product brochures, which are only useful as reminders after the connection is made, and certainly unlike the tchotchkes, which vanish in a virtual instant, the connection lives on.  If a true need and a true solution for that need are expressed, the sale will follow.  Capitalism will prevail, the invisible hand will have made its invisible handshake, and the Product Showcase will have been a success for that vendor and that customer.  For those who don't get it or don't have a product or solution that meets a need, or even those who do but who didn't manage to connect with the right people, and the Product Showcase will have been a disappointment.  I'll leave you to guess what I think of the show, but I will say my feelings are less determined by the stack of business cards and loads of scans than by the many excellent customers who we met who have to live with the real world of Notes/Domino and Exchange/Outlook coexistence or who have applications they can't put on the web without a way to edit rich text acceptibly or who have a pressing and urgent need for real fidelity in exports to Word and HTML.  These aren't emerging technologies, but pressing current needs, yet they also expose information that may not be out there in the conference.

Copyright © 2006 Genii Software Ltd.

Thu 26 Jan 2006, 09:54 PM
Phew!  Another Lotusphere done and gone.  It was a good one, but most of them are.  It was fun seeing old friends, and meeting many new people.  Since we had a pedestal, ir was a different sort of Lotusphere, but more on that later.  Mostly, I like seeing the people... Damien Katz explaining his new Couch database with its Fabric formula language at the Penumbra dinner... Andrew talking about his daughter Ariel and her soccer success... Mark Ramos sharing a pedestal and t-shirts and all... Rocky and Bob and Amy sharing their experiences at IBM, IBM and Microsoft respectively at the Penumbra meeting... Brad Kahn coming by the booth to see if I was still as obnoxious as I was when I was his manager at Jones Day... Gabriella and Tim and Andrew and others joining me at Beaches and Cream for milkshakes and good food... Dwight Wilbanks sharing his view of "how to get things done" at the Penumbra dinner... Bruce Elgort sending paying customers my way, since he can't accept their money... and on and on and on.  Good times!  Still, my feet are tired and I'm glad to be home.

Copyright © 2006 Genii Software Ltd.

Sat 21 Jan 2006, 07:15 AM
OK, the question has been asked (more than once.  OK, OK, several times).  Well, without going into a lot of details, I decided life in the week before Lotusphere was just a bit too simple and quiet, so... I bought a house.  Well, of course I didn't actually "buy" the house, but my wife and I saw it and saw it again, and put in an offer, and had the offer accepted, and that was all just the first day.  It has been twelve years so I went through this house buying thing, so I forgot the flurries of papers to sign just to set the whole thing up.  The long and short of it is, we got the house we wanted, but you all didn't quite get the finished database you wanted.  I am putting out the last version tonight or tomorrow morning, and version 2 had all the sessions except Gurupalooza and the opening sessions, but some of the cool "Google maps in the Notes client" type functionality I will have to show you at our pedestal #604, since I couldn't get it out there.

Oh yes.  My marketing director ("Quick! Switch hats, Ben") reminds me that perhaps I could emphasize that just a bit more, so.

Our pedestal is #604.  Come see CoexEditCoexLinks and the amazing Midas Rich Text LSX!

Ahem.  Anyway, so you have my apologies for the tardiness of the last version.  I had a house to buy.

But if you want to stop by and see how the sessions db was actually built, and how we created those slick graphical calendars and ripped data wholesale retrieved publicly accessible data off the Lotus website, you can stop by our pedestal on the showcase floor, or you can come to my ISV Theater presentation on The Making of the Sessions Database on Thursday morning at 9am in Europe 5.  Try not to disturb the crickets, as I imagine they will be the only ones up after the festivities at Sea World Wednesday night.  Anyway, if those options don't work, you can always accost me after the Business Development Day opening session or the General Opening Session, where if you watch really, really carefully, you might see them flash our new logo because we were finalists for the Best Tool/Utility Lotus Award.  ("Oh shoot!  I didn't mean to say that.  Do I have to?  C'mon, they don't want to hear this. OK, OK")

Genii Software's CoexEdit was a finalist for the 2006 Lotus Award for Best Tool/Utility!

Sigh.  Sorry about that.  You know marketing people.  Anyway, I look forward to seeing everybody as you dribble in over the next day or so.

Copyright © 2006 Genii Software Ltd.