Author Topic: Need PHP 5 source code generation!  (Read 3957 times)

kamil.svoboda

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Need PHP 5 source code generation!
« on: July 15, 2004, 07:18:14 am »
Hi,
PHP 5 has new object model with private and protected members, abstract classes and methods, interfaces etc.
We need to generate these new features from the EA.
Is there any improvement scheme of the EA?
Thanks
Kamil Svoboda

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Need PHP 5 source code generation!
« Reply #1 on: July 15, 2004, 04:35:29 pm »
Hi Kamil,

I have looked at the new features in PHP 5.  You should have no problems updating the existing PHP code generation templates to support them.  Doing this will not only mean that you can generate PHP 5 code, but you should also be able to update your existing PHP code to PHP 5.  You may however experience some problems when synchronising with code that already includes PHP 5 features because the parser doesn't know about them.

Full support for PHP 5 reverse engineering and synchronisation is not expected in the short term.  However, we are currently completing work to update the current MDG framework to allow users to specify a language grammar in an MDG technology file.  When this support is completed users will be able allow write a grammar for any object oriented language.  This will allow reverse engineering of custom languages, and when combined with appropriate code generation templates code synchronisation.

Eventually Sparx may support PHP 5 directly, but before then you will be able to do everything you need to do with it.

Regards,

Simon

kamil.svoboda

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Need PHP 5 source code generation!
« Reply #2 on: July 15, 2004, 11:31:27 pm »
Thanks for your reply,
Kamil

kamil.svoboda

  • EA User
  • **
  • Posts: 42
  • Karma: +0/-0
    • View Profile
Re: Need PHP 5 source code generation!
« Reply #3 on: July 19, 2004, 12:41:23 am »
I detect that there isn't PHP5 support for features like CONVERT_SCOPE macro,
"Create Property Implementation" dialog
forward synchronization !!! etc  >:(
Kamil
« Last Edit: July 19, 2004, 01:51:24 am by kamil.svoboda »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Need PHP 5 source code generation!
« Reply #4 on: July 19, 2004, 08:23:19 pm »
Hi Kamil,

You should have no problems implementing the generation of PHP5 in the code generation templates.  It doesn't have any unusual features that aren't in any of the supported languages.  I'll go over the problems you mentioned in your post but there's really no reason to get so upset.

The CONVERT_SCOPE macro will default to putting the scope into lower case.  If that isn't what you want then you could do something like this.

Code: [Select]
%if attScope == "Public"%
public
%elseIf attScope == "Private" or attScope == "Protected"%
private
%endIf%


The create property implementation dialogue allows you to select the language for your functions to look like.

As for forward synchronisation, read my previous post.

Quote
You may however experience some problems when synchronising with code that already includes PHP 5 features because the parser doesn't know about them.


Quote
we are currently completing work to update the current MDG framework to allow users to specify a language grammar in an MDG technology file.  When this support is completed users will be able allow write a grammar for any object oriented language.  This will allow reverse engineering of custom languages, and when combined with appropriate code generation templates code synchronisation.


Simon.
« Last Edit: July 19, 2004, 08:37:44 pm by simonm »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Need PHP 5 source code generation!
« Reply #5 on: December 21, 2004, 01:29:34 pm »
Thanks to Dmitry and Thomas for reminding me about this.

I have an update on our position, PHP5 support is currently in testing phase and shouldn't be too far away.

Simon

Dmitry_Bedrin

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Need PHP 5 source code generation!
« Reply #6 on: December 23, 2004, 09:46:17 am »
Thanks for Your reply.

However, could You please estimate the time period of releasing the version with php5 support (esspecially reverse-engeneering feature).

It's very important: our company is going to start a big PHP5 project during the closest month, and We're looking up a UML-modeling tool.


Best regards,
Bedrin Dmitry.