Can ISQL Perform forms co-exist with I4GL forms? - informix

Can ISQL Perform forms co-exist with I4GL forms within I4GL and access the same SE or IDS engine?

Yes
There are some caveats, but the general answer is Yes.
The main caveat is that ISQL forms can have multiple screen layouts which I4GL forms cannot; I4GL limits you to one screen layout per form file.
The next caveat is that the ISQL INSTRUCTIONS section can contain information that I4GL cannot use - BEFORE EDITADD and such like are not understood by I4GL. The 'MASTER OF' information is not relevant to I4GL either, any more than the screen records information from an I4GL form is relevant to an ISQL form. Joins and verify joins and lookups are relevant in ISQL and not in I4GL.
The tag DISPLAYONLY in ISQL is changed to FORMONLY in I4GL.
So, the typical ISQL form cannot be used by I4GL, nor vice versa, but the core 'language' describing the forms is the same. You can certainly have an ISQL form running in one window and an I4GL form running in another window and they can both access the same database, and usually can access the same table though you have to be somewhat aware of locking issues.
There is nothing to stop you having your I4GL forms and ISQL forms all stored in the same directory - except, perhaps, common sense. Your ISQL users shouldn't have to pick through the set of I4GL forms as well as the ISQL forms - so I would keep them separate so that the ISQL users only see ISQL form files (and the I4GL users don't see any of the form files as files in file lists - though I4GL programmers might see them).

Related

Is it possible to enable the standard Orbeon submit button in the example applications

Orbeon is providing some examples that can be run easily. For example I can run in my computer http://localhost:8080/orbeon/xforms-wizard-pfc/ that does not seems to be a form created using the Form Builder. I was always using the form builder as a starting point but the last days I was paying more attention on these examples for learning a little more.
In this case, it is a form that is using a flow with different questions that are defined in different XHTML files. I like this idea for using it in very big forms.
All this examples, are using custom submit buttons with its own actions, but none of them are saving the result into database except an example that uses a rest service of 'exists' database (I have configured my Orbeon datasource to use MySQL).
I have tested that some configuration of the form runner (properties-local.xml) affects also these examples such as changing the date format, therefore maybe it is also possible to enable the standard submit button that already I have configured and save the forms into database for later be shown in the summary page of the Form Runner. But I am not able to do this with these examples using the property oxf.fr.detail.send.success.uri.<app>.<form>. Specially, because no application is defined in the example.
There is any way to, for example, save the submitted data of these "XForms applications" using the datasource of Orbeon to save to MySQL database as when using a form created by the Form Builder?
Or I need to use rest services to send data to a custom application that does all this kind of work?
The example you're referring to (xforms-wizard-pfc), along with similar examples, are written in "plain XForms". In the other side, when you create a form in Form Builder, the result goes through Form Builder, that adds a number of features on top of XForms, like persistence or the error summary (with a number of them implemented, at least in part, in XForms).
All those features that are part of Form Runner are not designed to be used on their own, so you can't easily, say, "just use the Form Runner persistence" in one of your forms. This means that you most likely need to decide whether you're better off using the whole of Form Runner, or no Form Runner at all, and just write plain XForms.

How to edit several database entries efficiently from JSF web application?

I have several database tables that the user should be able to add, edit and remove entries from the web application.
Also the input must be validated before persisting it.
Now I could simply make a table and put labeled input fields in there, but the result would be far from DRY and a horror to maintain. Composite components make this just a bit better. Is there any alternative I do not see which could reduce a lot of work?
If I'm not misunderstanding the question, one concept you might wanna look into is generic/generated CRUD.
Netbeans has a primefaces CRUD generator link

db-driven / programmatic validation asp.net mvc?

I want to create a system where users can create forms through a UI, and the list of fields gets stored in in the database. The user can then choose validations for the form, and those get stored in the datbase too. When a user visits the form, the correct fields are displayed, and when they submit the form the correct validations are pulled from the db and run against the submitted data. Is there already any kind of system that does this (ideally open source).
I know there are form and survey services out there but I don't want a SaaS solution because I need to be able to customize most aspects (front end, server side, and db).
Type "open source survey software" into a search engine, and you'll find LimeSurvey, an active project with a viable survey system that you can manage and customize on your own server. It supports a number of common SQL implementations.
It's not aligned with the specific language & environment tags in your question, but otherwise seems a fit.

ASP.NET MVC: cache with non-cachable portions

I have a heavy page that is cached. This is okay for anonymous users. They all see the same page.
The problem is for logged in users. They should have minor parts of the page re-rendered on every request (like personal notes on content in the page, etc.)
But still all the rest of the page should be cached (it does tons of SQL and calcuations when rendered).
As a workaround I put placeholders in page templates (like #var1#, #var2#,..).
Then I make controller method to render View into string, where I do string.Replace #var1# and other into real values.
Any cleaner way to do such kind of partial "non-caching"?
This is called donut caching.
The ASP.Net MVC framework doesn't currently support it, but it's planned for version 3.
To start things off, it might make sense to go through the page and see if there is anything about it that you can do to streamline or reduce the weight. Depending upon how bad things are, investing some time here might pay off in the long run.
That said, in regards to trying to server the content to anonymous as well as logged in users, one option is to have two versions of the page: one for anonymous users and one for logged in users. This may not be the best approach though as it means that you now have two versions of the same page to maintain.
Given the lack of support doughnut caching mentioned by SLaks what I would likely do is try and cache the results of the calculations that are being done for the page (e.g. if you are querying a database for a table of data, cache a DataTable that you can check for before running the operation) and seeing what that does for the performance. It may not be the most elegant solution in the world, but it may solve the problems that you are having.

How to structure VB.NET Windows Forms applications

What is the best way to structure a VB.NET Windows Forms application so that code can be reused and the application can be extended easily?
I used to create lots of new forms. This lead to lots of repeated code and forms which did similar things.
Now, for forms which do similar jobs, such as view/edit/delete items from a specific database table, I create a form with the required controls, have the form create an instance of a class with parameters such as a collection of the controls and a string containing the database table name. Then the individual controls call functions of the class.
Advanced forms will inherit and extend this basic form class.
Has there already been work done in this area?
Are there books / articles available which discuss the options available on this topic?
I had great success with this Passive Screen pattern.
In my opinion, the big problem of the traditional MVC architecture is that people stuff way too much into the form classes. This increases the amount of manual testing you have to do.
The more automated testing you can do after you compile, the more bugs you will catch at your desk. In a complex application, the side effects from even minor changes occur all too often.
The trick to solving this is making a controller assembly that the form assembly (or EXE) references. Every form has a corresponding class in the assembly. Clicking a button will call ThisForm.ThisButton(<args>) which will then fire objects lower in your framework. Each form implements an interface so that, if the controller class needs additional information from the form, it has a interface to retrieve it.
Then for your unit testing you simulate an operator performing complex operations by implementing dummy classes to fire events and feed information to the controller classes. The controller classes don't know any different as the dummy classes implement all the expected interfaces.
There is an important exception and that is for trivial dialogs. For dialogs that have a few check boxes I feel this organization is overkill. I use the command pattern a lot. So in the assembly where I define the Command objects, I put the SIMPLE dialog associated with that command. How simple a dialog has to be to get this treatment is up to you.
I like to structure my applications as follows.
Utility - This is an assembly that has stuff I use all the time - Math functions, file function, etc.
Objects - This has the specific objects I am using for this application.
UIFramework - This defines all form and controller interfaces.
Commands - This has all the Command objects that manipulate my application objects.
UI - Objects that implement the controller interfaces
EXE - Forms that implement the form interface and calls the controller objects.
You may want to check out a Rocky Lhotka's popular CSLA Framework. It provides a very structured way to implement business objects so you can keep the non-UI code out of your forms. Beyond just separating your business logic though, it provides built in n-level undo, validation, security, data binding support, etc.
The one complaint most commonly directed at CSLA is that it makes test driven development difficult, so that may be something to consider as well.
Something that can help a lot is the use of User Controls. With user controls you can reuse the same UI in different forms. Also, you can have many user controls on one form, so if you have a form with a tabcontrol that has 5 tabs, the content of each tab could be a user control, so instead of having hundreds of controls all mixed up in one form, each user control has its own controls and validation logic, and you end up with just six controls in the form: the tabcontrol and the 5 user controls.
This doesn't help in separating UI code from application logic, but it enables you to have small, structured entities instead of forms with thousands of lines of code.

Resources