Book a Demo

Author Topic: Generating UI code  (Read 4501 times)

Codesmith

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
  • Yo
    • View Profile
Generating UI code
« on: November 26, 2005, 10:56:38 am »
I am interested in if the User Interface Elements can be extended to generate actual Forms and Controls.  ;D

I would like to define the types of controls, datasources and data object methods through EA element properties and relationships.

Then generate the objects and most of the code needed through some kind of translation/ code generation process.

Is this possible with the present structure? ???

thomaskilian

  • Guest
Re: Generating UI code
« Reply #1 on: November 29, 2005, 01:09:19 am »
I started that (only a little). What I did so far was creating PHP code from Screens. If I could work full time for that I probably could produce some fancy code generation, but unfortunately I'm just doing that in my spare time. You can create code generation patterns to emit PHP code (or whatever Java/VB/... you use for your server).

Would be nice to have some profile/technology for that.

Codesmith

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
  • Yo
    • View Profile
Re: Generating UI code
« Reply #2 on: November 29, 2005, 08:09:48 am »
What I am wondering is what details are available about the UI elements. And if there aren't a lot of details like type of control, position, bound datasource etc...Can these details be extended through scripting of EA?

thomaskilian

  • Guest
Re: Generating UI code
« Reply #3 on: November 30, 2005, 04:10:52 am »
What do you expect exactly? Of course you can add tags as you wish...
« Last Edit: November 30, 2005, 04:11:06 am by thomaskilian »

Codesmith

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
  • Yo
    • View Profile
Re: Generating UI code
« Reply #4 on: November 30, 2005, 09:50:40 am »
Are you talking about Control Tags?

If you are talking about UI element tags. How does one add tags to them?
I am generating the data mapping layer with Tier Developer(TD). So I have methods and properties to bind the controls to.  TD also has form generation but only very basic.

I am hoping that I could retrieve the control type , position, data input rule, assigned datasource from the EA form element and then generate the form in VS.net

thomaskilian

  • Guest
Re: Generating UI code
« Reply #5 on: November 30, 2005, 01:59:55 pm »
I'm talking about simple Tagged Values (ctrl-shift-6). You can add anything like Position, Color, etc. Would that be of help?

Codesmith

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
  • Yo
    • View Profile
Re: Generating UI code
« Reply #6 on: November 30, 2005, 02:59:26 pm »
OK,  That's interesting!  8) Obviously I need to learn a lot more about EA.   Can we access those values from the XML/XMI file?

      I noticed that size and position of most elements in the diagrams is irrelevant.  But size of a Form or a container control is very relevant as this is normally how we'll get the position coordinates of child controls.

       It would be better if we could somehow read the size and position coordinates from the EA diagram storage method maybe?

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Generating UI code
« Reply #7 on: November 30, 2005, 03:06:35 pm »
Hi,

size and coordinates of an element on a diagram are easily accessible via the Automation Interface... maybe that will help :-)

Bruno

Quote
OK,  That's interesting!  8) Obviously I need to learn a lot more about EA.   Can we access those values from the XML/XMI file?

       I noticed that size and position of most elements in the diagrams is irrelevant.  But size of a Form or a container control is very relevant as this is normally how we'll get the position coordinates of child controls.

        It would be better if we could somehow read the size and position coordinates from the EA diagram storage method maybe?


Codesmith

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
  • Yo
    • View Profile
Re: Generating UI code
« Reply #8 on: November 30, 2005, 03:23:24 pm »
Yeah that seems right. I looked at that documentation.

Thanks a lot!! you are the best!! ;)

Now I just have to find somebody that can do that kind of work. :-/

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: Generating UI code
« Reply #9 on: December 01, 2005, 01:30:22 am »
It's just a bit of Perl ;-)

(or VB, if you prefer)

Check out other postings in this section, Thomas has posted a few things on the subject.

You can (probably) write a 5-liner in Perl to access the stuff you need, though it won't have a GUI !

Codesmith

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
  • Yo
    • View Profile
Re: Generating UI code
« Reply #10 on: December 01, 2005, 07:55:19 am »
Can the EA forms be modified?

I am also thinking of ways to auto generate User UI Help.  I am not much of a coder anymore despite my handle. :-[

Are there some coders around that are really into extending EA?  Or can you give me an idea how to find them?