Java Break – BASIS RAD Tools Enhanced

Welcome to this Java Break with BASIS Today’s topic is BASIS RAD Tools Enhanced We are going to have a look at all the new features and functions we’ve added to the BASIS RAD tool Our agenda will cover a quick overview of Barista. And we’ll talk about the Barista enhancements In forms, we’ve added both the ability to specify fonts as well as to add your own custom CSS for your BUI (browser user interface) versions of your forms. And then we’ll talk about error handling and debugging tools There is quite a lot of information we’ll cover in this area and we’ll have a lot of video to show you. Then we will look at query filtering. How we’ve enhanced the query filtering capability for your power users. Then we’ll take your questions Let’s have a recap of the Barista RAD tool It inherits all of the BBj tool functionality and adds a data dictionary based Form Generator in which you can add callpoint structure for injecting your business logic in response to certain events – be they GUI events or be they data type manipulation events It is also an SQL-based inquiry subsystem and a document management subsystem And of course, one of the key functionalities that the Barista RAD tool offers you, is the ability to preserve those customizations that you might make for a particular site through the upgrade cycle. So allowing you and your customers to take upgrades and refreshes of your product while maintaining the customizations that they’ve paid for It accommodates multi-screen work spaces with both the MDI and the ability to launch SDI from within the MDI. And in fact, you can also launch some forms in the BUI, the browser user interface, from within the MDI form It gives you functionality like user-based favorites for your users to add commonly run tasks to their Favorites list And context-sensitive help. The really good example that is the Addon help subsystem. Context-sensitive help Have a look at it by downloading the product We give you multi-language support from your single source code So the capability of having many languages and having your application translated into the workforce language of the users It supports data replication as you might expect and it has navigation flexibility whereby your applications will support both keyboard navigation as well as mouse navigation The report writing tool, BBJasper with iReports, is built-in. The integration is in place and gives you the ability to produce this sort of output such as this example of an AddonSoftware statement Barista will give you the functionality to record any changes to your database via an audit trail showing you the previous value and the current value, the date changed and who made the change Barista enhancements, let’s move on to them Fonts and CSS gives you the ability to add a visual reminder that a particular form field perhaps is required You can either change the font or you can use CSS to set a background color on the control Let me hand you over now to Ralph Lance who will show you an example of the Barista enhancements Barista has been enhanced to allow for the stipulated font information at three different levels. At the very highest level, seen in the configuration maintenance under the Barista Development menu About halfway down are the three relevant font related attributes font name, font size, and fun style. The font name is set to ‘Dialogue’ when installing Barista. The Java Virtual Machine will see ‘Dialogue’ and use a specific operating system font depending on the Java Virtual Machine The font size is set to a default of eight points and the style is zero or blank, which means plain. If we look at the BASIS help for the ‘makeFont’ of BBjSysGUI, we also see a list of the other fonts that are automatically installed with BBj We also see the numerical values of the styles that need to be entered here in the FONT_STYLE attribute At the next level, which is the form level, we will be using the ‘Product Category’ from the Barista Examples application If I just let this run as is without having made any changes, we see the form looks like this Let’s now go into the Form Designer and make a change to the general font that should be used for the labels and input controls of this form The first entry in the list of data names or columns

on the left hand side is the entry In the middle block we have the attributes that can be set at this level Down near the bottom is the font attribute Double-clicking on the Query button brings up the font chooser – a comfortable choosing mechanism for choosing fonts Let’s change the form font to ‘Magneto’, say ‘OK’ and we see the format ‘Magneto’ and then this style as a numerical value and the number of points I can immediately do a Refresh and see the new font information reflected in the graphical area of my Form Designer If we let this run, the form will be built with the new form-based font information and I see that the labels and the data are in the new font I can also set fonts at the third level, the most detailed level, which is the column Similarly to the form near the bottom I can click two times on the Font attribute and pull up the font chooser. Let’s just leave the default as it’s proposed here in order to show the contrast I do my Refresh and see the new description font. If I let it run, then I’ll see that the label and the data for the Description field are now the Microsoft San Serif So with this you have more flexibility in the construction of your forms and their look Thanks Ralph. Let me send it straight back to you to show off the CSS functionality that we’ve added to Barista In Barista, under the Barista Development menu, we start the Former Manager and do double-click on the form that we would like to use In this particular case, the Barista-Examples Product Category The first entry we see on the left hand side under the list of data names names or column names is the ALIAS Entry The ALIAS Entry represents the form level attributes In the middle we have a list of the attributes for that level and at the bottom we see the attributes CSS Styles. Note the plurality of the name because you can have a common comma separated list of style names Similarly, at the column level or field level at the bottom of the attribute list is also the CSS Styles attribute What we’d like to do is we’d like to provide visual feedback to the user that the description is a required field To do this we first tell Barista that the description is a required field by entering a minimum length of one Which says that something has to be entered in this field Now the hook to the cascading stylesheet definition is through the Style Name property that we enter here Let’s call it ‘Required’. Having done so, I just build the form… and we can see the results of the minimum length one in running the form in GUI. We’ll just try to add a new record and go through the description without entering anything And sure enough, I get a notification that an entry is required for the field. But I don’t see any visual feedback that it’s a required field ahead of time One step still needs to be done and that is in the stylesheet.css found in the Barista installation under Barista, sys, config. We have to ensure than entry has been made that has the property ‘required’ and sets our background color in this case to yellow We see here in this example the required property has been defined and any control having the ‘required’ style name will have its background color set to yellow

So we’re all set because this ‘stylesheet.css’ will be automatically deployed to BUI when the form is run from the Barista MDI in BUI We do so by doing a right click on the form and simply choosing ‘Launch in browser’. The browsers has started and the BUI form shows us visually that the Description field is required before we even have to go through it. Let’s test that here in BUI I’ll get rid of the description that was there, press Enter and sure enough I get the notification that an entry is required for this field With CSS you have a powerful mechanism for look and feel outside of the program itself Thanks Ralph. Let’s have a look now to Barista enhancements in terms of error handling. One of your concerns may have been what happens if I’m using a framework? How do I track and handle errors that might happen unexpectedly in the field? Well good news is we have a new error handing subsystem and it incorporates different modes: Strict, where you just send the report, the user can’t do anything else, Authorized, where one is able to break into the console with a password so perhaps you take remote control the user’s terminal and you can supply the password to break out into console and do debugging, and Open, where we can break to console and not need a password at all. Error reports are now handled by the Barista Document Processor So those error reports will include the dump or not, at the user’s discretion and that’ll be sent out via the Document Processor Let’s have a look at a demonstration of that Let me hand over to Chris Hawkins to take you through the process Let’s look at our error handling settings These are the settings that work together to help you configure how strict or how lenient your system is in terms of access to the console in the event of an error. For starters, here in Enterprise Manager I have my Disallow Console flag set to ‘true’ so I shouldn’t be allowing access to the console And I can double-check that here in Barista if I try to just go to the Utilities menu and bring up the Default Syswindow, what appears is this little message telling me I’m not allowed to do that So in the very strictest sense you can turn off access to the console and in that mode if I encounter some sort of unanticipated error – I’ve planted an error in this little report program – I have the option when the error message comes up I see what the error is I can Abort, I can send an Error Report. Those are my only options. I don’t have any opportunity here to get to the console So that’s the strictest sense. Let’s move on now to providing a little more leniency – authorized access to the console. And I’ll do that here by turning off the flag or switching the flag so that I’m no longer disallowing console access So that will open up console access. I don’t want to open it up all the way, so I’m flipping over to Barista config and we have these ‘CON’ globals – CONEXIT, CONMESSAGE,CONPASS that are up REM’d out by default but we can un-REM them in out Barista config. So before you can get to the console you’re going to see a message and you’re gonna have to provide a password So, given those changed settings we can run that same report again and in this case when the error occurs we are going to now have a Debug button We didn’t have that before because there was no permission granted for the console. Now they’re is but it’s gonna be authorized or limited, rather than just dropping to a prompt I can see the error and I’m given the message. I have to provide the appropriate password and only after I provide the appropriate password do I actually get to a prompt. So that gives you authorized access And of course you can open up access then by just REMing these out again So that no matter what, I can get to the console and it’s not going to you ask me any questions. So under those circumstances I can run this report again when I encounter my unanticipated error I can still Abort or send an error report… I’ll come back to that But the debug in this case is going to now just drop me directly to a prompt So those are the three levels access you have in terms

of getting to the conole or not and now we can take a look at how the error reporting side of things works Regardless of how strict or lenient your system is configured with respect to getting to the console, you can always send an error report if you run into some sort of unanticipated issue So let’s look quickly at how the error reports work. So we have this same report into which I introduced and error. And if we say to send an error report you’ll be presented with this little dialogue where the report name has been supplied and there’s a default address here where the report should be sent. This is something that you want to configure And you can choose whether or not to include a memory dump with the report. So for starters I’m going to uncheck that and let’s just say “Got an error.” We will provide a message to go with this and I’m gonna click the ‘Send’ and then it goes on to say its gone ahead added this document to the processing queue and it’s just letting me know that the processing queue is turned off right now So it doesn’t stop it from going out to the processing queue it’s just letting me know that the error report is not going to go any further than your processing queue right now And then it returns me too the error message So I can abort at this point. Let me jump right back in…I’m going to run this one more time so that we can do another one and this time we will include the memory dump. The document has been added to the processing queue and the processing cue itself is currently idle So having done that let’s go over to Barista Administration and I can go over to my Document Processing Queue and I can see that there are a couple entries here. The smaller one the .txt will just capture the pertinent information about the error and your comment. The one that is a .zip will capture the memory dump as well So having seen how we can get our familiar debugging capabilities in a production environment let’s turn our attention to the development process What additional tools have we added there? Well, you see there are quite a few Let’s go through them. We have the Callpoint Monitor, which allows you to display any active or all callpoints that may be accessible to you It helps you know exactly where you wish to put your business logic. The Query Monitor will show the SQL SELECT statements and allow you to either harvest those for use in the Enterprise Manager or modify them if they’re not delivering the desired results There’s an Interrupt Process where you can break into the Barista code and step through your code View Dump displays the globals and the variables of your workspace, and Stop/Stop Trace – both timed or untime traces which can be used with the performance analyzer And then the ability to view the Namespaces, either the global or group namespaces Let me hand you off to Chris Hawkins again to show you all of these in action Let’s take a look now at the items available here in the Barista Development menu, these developer debugging tools, starting with the Callpoint Monitor. Not a lot going on initially but as I bring up a form and I’ll navigate through a couple of records…we can see that it’s reporting to us where callpoints are firing. That is where it’s reaching out and running our additional business logic So I can use this to get an idea of whether or not my callpoints are firing and I can run this in sort of an abbreviated way. This is only showing me active callpoints and its ignoring any attempts to look at callpoints in other applications If I want to look at active and inactive callpoints, then I can run it that way as well. So now we see a mix of black and grey rows here. the grey being callpoints that Barista would fire. So these are callpoints that are in the chronology of the callpoint series but there’s no code behind these – these are inactive And if I also take off the Ignore Attempts and do the same we can see that callpoints look like they’re firing multiple times and that’s because Barista will look then at any application that is synched in to this copy of Barista for callpoint that may be related to the one that is being fired in this form So it’s a really handy tool to get to see what’s going on in your callpoints I can, of course, clear the form at any time and begin again I can mark a row so that just puts some coloring on it so if I want to know a particular spot, I can mark it that way. So that is the Callpoint Monitor

Next up is the Query Monitor Again, not a lot to see initially but I’m going to go back and launch the Inventory form The Query Monitor lets you see the actual SQL that Barista is constructing whether you’re launching a pre-built query, that is one of Barista’s standard queries – binocs or magnifying glass And here we can see that we launched the query and the monitor has recorded the actual SQL then that it used to produce that query grid. And this works the same here as it does with custom queries. So whatever query I happened to run we will see those to stack up here in the grid and the SQL then associated with that particular query will show down below It’s a great tool to use if you want to copy/paste code from here into Enterprise Manager for example If you want to just see the code that Barista is using or if you’re trying to troubleshoot some have your own custom queries. So that is the Query Monitor The next tool is the Interrupt Process We know that we can plant escapes in our own callpoint code. The Interrupt Process lets you drop directly into the Barista side of things. So with any Barista form running, be it a regular form style or a grid or a header detail, which is a combination of form and grid…I can hit the interrupt process and that will drop me to console mode directly in the Barista program that is in charge of running my form And so obviously once I’m here I can dot step through, I can print variables as need be Whatever I might want to do to troubleshoot or to see what is happening in the framework side of my running form. And if I type ‘run’ then I can focus back on the form and just pick right up where I left off.Sso that is the Interrupt Process feature This next developer debugging tool lets you view a dump of all the values that are being held in memory associated with this form in its current state So when we click the View Dump window we’ll see that we can either look at all the various globals that are set or at all the program level values A lot of information available here and again that will be available to you anytime you have a Barista form up and running. So another great debugging tool We saw that we could interrupt a process we also have an item on this development menu that lets you start and stop a trace So as you can imagine this handy as well Once I have a form up and running, I can choose to start either a timed or untimed trace and you know there are good use cases either way, it depends on what you are trying to troubleshoot So I will set this one up to be untimed and then go on about your business Enter the values are trying to enter, do whatever it is that you’re interested in tracing If you close the form, the trace will automatically stop but if I want to stop it at some interim point…if I want to stop it just after I’ve gone through these few fields for example, then I can go right back to the development menu and check the Start/Stop Trace again and Barista will now tell me the name of the trace file so I know where it’s been saved and it reminds me that this was untimed And lets me know I can use my favorite editor. Of course, if it’s a timed trace you can also use BASIS’ BBj performance analyzer to look at it as well. If you haven’t done that, that’s another really handy tool to use So, this is a great way to very quickly be able to trace portions of your code And last but not least, we’re able to View Namespaces Once again, you need to have a form up and running and when you do, similar to the View Dump feature, you can bring up a window that lets you view any of the namespace information as well. So, I can see both GlobalNamespace or all of the values that are defined in the group namespace Finally, a really neat enhancement to the Query Filter Form. You can now directly edit the WHERE clause depend upon the role on the user. It provides a point-and-click interface for building more useful WHERE clauses Better control of the AND/ORs, the elections,

and adding parentheses for grouping. Let’s hand in back over to Chris to demonstrate Let’s take a look at how the query filtering works in the Barista query tool. We’ve launched the Addon Vendor Master form and we’ve hit the binoculars to launch the standard query We know that we can sort and search on these columns. I’m going to be using the query tool so I’m going to click the Query button and that opens up the query tool. Let’s take a look at what we can do here With the point and click interface we can select a combination of columns So I’ll choose Zip and an Operator…let’s say ‘Begins with’ and then a value, I’ll put in 9. And when I say ‘Enter’ that portion or phrase of the WHERE clause will be shown over here in the window. And then let’s do a little more here Let’s say ‘And’ the ‘State’ ‘Equal to’ and let’s say Oregon I will enter that piece. Then we will say ‘Or’ ‘States’ ‘Equal to’ California. So we’ve entered all the independent parts of the WHERE clause and now we would like to execute So to actually have the filter take effect to hit the ‘Execute’ button and its narrowed us down now to a smaller number of rows If we look closely will see that we have California and Oregon states but one of the zip codes does not begin with nine That’s of course because here we haven’t established any grouping in this ‘WHERE”clause. So this is being interpreted as ZIP needs to begin with nine and the state needs to be Oregon So those two will be put together ‘OR’ the state needs to begin with California. And that’s probably not quite what we wanted we wanted to have the ZIP to begin with nine ‘AND’ state being Oregon or California. A Slight difference in the way we want to construct this. So if I’m a user with permission to edit the WHERE clause directly, I can just click right in this edit box and put in the parenthesis that I’d like to have hit the ‘Execute’ button and now we see that that outlier is gone. We’ve got the query set the way we want it So, if you have permission that establishes you as a user who can type directly in here, if you know the column names and the field names you can type those in If you want to put in the operators and so on you can type all that directly in the box Of course it’s much easier to get started with the point and click interface Now suppose you’re not a user that has this level of access? How would you get that grouping to to take effect? Let me show you how that will work I’ve logged on here now as a different user. A user with less permissions than the Administrative User we saw in the previous example. So here I am in the Vendor Master again and I’m going to you bring up the filter button So let’s reconstruct that very same WHERE clause. We’ll start with ZIP_CODE ‘Begins with’ nine and we’ll Enter and the State ‘Equal to’ Oregon and Enter…’OR’ the State ‘Equal to’ California, ‘Enter’. So just like before, except you can tell here that we no longer have edit permissions in this input control So, when I say execute once again we will find the California and the Oregon states We will find zips but we no longer have the ability to directly edit this WHERE clause. So how will we make that work? With the point and click interface even though I can’t edit directly I can use these other buttons to navigate back through the chunks of this WHERE clause So you can see that as I start to press the left and right arrows, it’s taking me back one piece at a time or forward one piece at a time through the clause. So if I need to make an edit I just position myself in front of that particular part of the phrase So here we are in front of the state of Oregon and will tell it to enter

a left paren. We can see that it constructs it over here And then we navigate to California phrase and enter the right parens. It’s just that easy to move back and forth. I could Insert or Clear parts of the phrase.So here I’ve been able, just with the point and click interface, to put in those same grouping parenthesis so that if I click the ‘Execute’ button once again we’ve taken care that outlier and the WHERE clause is giving us the results that we would expect And of course it’s important to remember in Barista that you can save these So if I give this particular filter a name of ‘Zip 9’ then it’s going to appear up here If I have adequate permissions I can save that so all users can use this named filter This gives me very quick access then if I’ve turned off the filter tool to either run unfiltered or to very quickly get back to a filter that created and previously saved So a really powerful filtering tool In summary, we’ve had a quick review of Barista. We’ve looked at the Barista enhancements in the forms of both the fonts and the new cascading style sheets for your BUI forms We’ve looked at error handling. How you can debug in production and also the debugging tools while in development And finally, we’ve looked at how the power users can take advantage of the new functionality of the filtering in the queries