: 4582 | 108668 | 12353

Extend @Formula using Java 
Use this IdeaSpace to post ideas about Domino Server.

: -8
: 3
: 11
: Domino Server / Web application server
: formula, @formula, java, extend, custom, function, @function
: John Foldager620 29 May 2008
:
: / Email

This post should be for both Lotus Client and Domino Server idea spaces.

I would like to see a possibility of extending the @Formula code with custom commands created in Java. The commands should be able to run in the Lotus Expeditor Client as well as on the Domino Server from anywhere we have formulas. Maybe make it possible using extensions.

An example of a custom function "CustomFunctionSQL" using a new @Java formula:

id := "MyID"; optional_maxrows := 10; JavaObjectResultset := @Java.CustomFunctionSQL("SELECT * FROM db2tablename WHERE id = " + id; optional_maxrows); output := ""; @For(i = 0; i < JavaObjectResultSet.getCount(); i := i + 1; . . . . JavaObjectRecord := JavaObjectResultset.getRow(i); . . . . output := output + JavaObjectRecord.getField("Firstname") + " " + JavaObjectRecord.getField("Lastname") + "<br />"; . . . . ); output

UPDATE 2011-11-26 XPages fully works for me for what I needed 'back then' :o) so the idea is not withdrawn




1) Axel Janssen5023 (29 May 2008)
I think this has a high potential of creating confusing and hardly maintainable code.
What is the advantage of Java in your SQL example, anyway? Such SQL stuff can be coded in LotusScript, too. So, Lotus could have created Lotus Script-extensible @functions much earlies.
Also I am all for layered architecture. SQL is very Backend (persistence) and @formulas are most powerfull in the frontend (view layer). This is mixing both and in the end such hybrids do not gain much popularity.
For example how many organisations are using those Lotus-Taglibs when integrating Domino from their Java applications? I haven't met anyone, though I've seen a lot of Tomcat/Websphere apps accessing Domino.
Or lotus workplace had afaik no clear separation between backend and frontend.
And the Java space has gone through a painfull learning process with using such low level APIs like JDBC in applications. Today most use some sort of extra libraries, that hide the complexities of JDBC like ibatis SQLMaps or Hibernate. And the code using this libraries which hit the database is more often than not in a special DAO layer, where it can be unit-, integration-, and load-tested.
2) Jeff Gilfelt1049 (29 May 2008)
You can do this today using the C API. There were also a couple of 3rd party products available back in the day ("Formula One Toolkit", @YourCommand).

I pretty much agree with the previous comment - it sounds like a good idea but would probably end up being abused.

3) John Foldager620 (29 May 2008)
I agree that this could potentially abuse Notes/Domino, but Lotus isn't making it easy for us to extend the product. By integrating Java it would open up a whole new world to the Notes/Domino community. My code above is just an example and the SQL part was just to simplify how it could be done.

As I Notes/Domino developer it is my own responsibility of making code that performs great and is maintainable. Depending on the requirements and ideas you have for a project lets face it... Notes/Domino just isn't open enough to make all of us happy with the current implementation ;o)
4) John Foldager620 (18 Jan 2009)
I guess someone at IBM did have the same thoughts as of how to extend the current functionaly. In XPages (which is really great) you can use JavaScript, Java and @Formulas in combination. This is great!!! Now we only need to have this everywhere ;o)
5) John Foldager620 (26 Nov 2010)
Status changed to Withdrawn










:
:




Welcome to IdeaJam


You can run IdeaJam™ in your company. It's easy to install, setup and customize. Your employees, partners and customers will immediately see results.

Use IdeaJam to:

  • Collect ideas from employees
  • Solicit feedback and suggestions from employees and customers
  • Run innovation contests and competitions
  • Validate concepts
  • Use the power of "crowd-sourcing" to rank ideas and allow the best ideas to rise to the top

IdeaJam™ works with:

  • IBM Connections
  • IBM Lotus Quickr
  • Blogs and Wikis
  • Websphere Portal
  • Microsoft Sharepoint
  • and other applications.

IdeaJam has an extensive set of widgets and API's that allow you to extend and integrate IdeaJam™ with other applications.

Learn more about IdeaJam >>






IdeaJam developed by

Elguji Software Logo