Reverse engineering in Bouml for php project - zend-framework

My php project using Zend framework. i want to generate class diagram for that php(zendframwork). i try to generate class diagram using Bouml project.
I go through this link Boumal java reverse engineering video
but problem is when i drag and drop every php class but that don't show relationship between class

You could give UML Lab (http://uml-lab.com) a try (Note: I'm biased as I'm working for Yatta Solutions ;) ). There is a tutorial explaining how to reverse engineer existing source code: http://www.uml-lab.com/en/uml-lab/tutorials/reverse-engineering-tutorial/. Basically, just create a new Model and Class Diagram and all available PHP source files are imported automatically. Otherwise you can import a PHP file by dragging it onto the diagram editor.
The tool supports Java and PHP, and has build-in support for Zend Framework. It may not understand each PHP source file - but files containing a class should work fine. If there is something the tool doesn't understand you'll be notified and can directly file a bug.
It's a commercial tool, but there is a 30 days trial and a free academic edition. If you have any questions don't hesitate asking them in the forum, bug tracker or by mail.

each time you add a class in a class diagram the relations with the already present classes are shown, except of course if you modified the "drawing settings" to not draw automatically the relations.
but this supposes there are relations to draw ;-)
Php is a not typed language, so the reverse can only create inheritances, the types of the attributes are unknown contrarily to C++ or Java

Related

EPiServer migrate content from home grown CMS

Hopefully someone can help me, I'm new to EPiServer and have been given a data migration task. We are using the latest version 8.5. I need to migrate content from a clients home grown CMS (that luckily is in a tree like structure) to EPiServer. There doesn't seem to be a whole lot of information about this on the web - perhaps I just don't know the right thing to search for.
It looks like using the EPiServer.ServiceApi might be the route to go but again locating useful documentation is proving difficult.
I was thinking of setting up the client CMS in SQL Server and writing a simple console application to call the EPiServer.ServiceApi inserting the content. If anyone has any information on this or better still and example i would be very grateful.
Thanks,
Dan
If you are just importing content from another CMS I would write a scheduled job in EPiServer:
http://world.episerver.com/code/dannymurphy/Stoppable-Scheduled-Job-with-feedback/
That job then uses the standard IContentRepository to create content:
http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/Content/Persisting-IContent-instances/
That way you can run it whenever you want and have access to EPiServers complete API. Also you can see progress of the import through the job status.
In the job you can read the content as a file in any format you like or directly from the source CMS database or some xml or RSS feed perhaps.
I have moved content from PHP, Java and .NET CMS this way. In .NET you could even access the source CMS via WCF or SOAP if available.
The ServiceApi is relatively new and more focused on Commerce products and media assets rather than CMS page and block content so I wouldn't use that.
There is complete documentation below for the ServiceApi by the way, did you not find it?
http://world.episerver.com/documentation/Items/EPiServer-Service-API/
Regarding language management you can read more in the below links:
http://cjsharp.com/blog/2013/04/11/working-with-localization-and-language-branches-in-episerver-7-mvc/
http://tedgustaf.com/blog/2010/5/create-a-new-page-language-branch-programmatically-in-episerver/
Basically you have two options for multiple languages. If the content is just straight translations you should create nine different language versions (branches) of the same page. You can also have multiple sites in an EPiServer installation but that requires 9 separate licenses (and the associated costs).
I've done a lot of EpiServer content migration projects. The easiest way if it's possible is to export your current sites tree in Json and then import that into EpiServer. I've had to do it on a recent project and mixed with Json.net it's pretty easy.
If you want to go that route you can find all the code to do it here: EpiServer Content Migration With Json.Net/

T4 template and EF with Code Generator from database schema Application

I am currently in process of putting a process (using a windows application) in place where EF's POCO objects classes can be generated by pointing this app to the database table(s).
I have seen T4 templates and the VS Addin which helps to achieve this in VS. However it requires T4 template file on the VS solution. We do not want to go through this route. What we want is to just copy the classes generated by this app to the solution so it can be used.
The way T4 template works is that as soon as you make a change in the template it applies to the Class file. What I would like to do is to point the new App to the database and say tables A,B,C. The app will read the columns,types,relationships and create corresponding classes to a folder. Developer then Copy these classes and paste into VS solution. Longer terms plan then to extend this app to write repository classes.
I have rough idea but not a clear picture. Does anyone has any pointers about how about can I go to achieve this?
Thanks
Edit: This is purely in mind using EF Code first.
What it seems you are asking is "Can my T4 templates live in a separate solution to my output code?".
Yes. You can do that.

Integrate custom annotations in Zend Framework and Doctrine project

I need some advices or experiences in integrating custom annotations for Doctrine generated entities, but I also want to keep native Doctrine annotations so that they can be somehow registered together.
I have succesfully integrated Doctrine in my ZF application and tested it.
Now I want to have some validations inside my entites. I don't want to write any code in my entities or modify setters. I googled for suggestions and there are some libraries that do the job. Those libraries also provide the ability to return Doctrine entities objects as array (toArray()).
I tried to integrate one of those called Spiffy Library (https://github.com/SpiffyJr/Spiffy). Homepage http://www.spiffyjr.me/.
I followed instructions on that page to include it in my project but no luck. Any help on these would be so appreciated.
Guess I didn't setup correctly AnnotationReader. However I did AnnotationRegistry-ed some of files from Spiffy library (spiffy\Doctrine\Annotations\Validators).
Also gave Spiffy Abstract library my entity manager from ZF registry.
I can also paste some of my code here if neccessary.
Thnaks in advance.

Useful Silverlight class library with reference to .NET class library

I'd like to develope simple set of controls to display many sort of data and be useful in normal silverlight application and can be used in ASP.NET MVC2 application. Right now i have no idea how to link those tehnologies, but this isn't my concern right now - i just heard it is possible and i'll find out how to do that...
Right now i'd like to know how can i use my Model's classes in such SIlverlight class library. I've generated POCO classes in EF4.0 for ASP.NET MVC2 application. Everything works great, but now i'd like to use some of those classes - create silverlight's controls, some ViewModel classes and fill my controls with data passed from my Model, used in ASP.MVC's app, through ViewModel.
Everything should be tested in any simple silverlight's app and at the end i'd like to be able use this class library in silverlight app and in ASP.MVC 2 website...
Silverlight it's own runtime and in general you cannot mix normal .NET assemblies and Silverlight assemblies.
However, one option is to share the source code by linking the same source file to two projects that compile to the different runtimes.
Another option is to use WCF RIA Services where Visual Studio will code generate your model classes in the Silverlight project and there are also options for sharing code between tiers. You will also get a service to operate on the objects from Silverlight. The service can be built on top of EF4.0 with very little code.
Finally, Silverlight 4 and .NET 4 are in some cases able to share assemblies if certain criteria are met. See Stack Overflow question named Silverlight 4 Assembly Sharing Problem.
What you need to do is use shared code.
you do this by adding an existing file to a project. In the add file dialog there is a arrow on the button that exposes the add as link option.
the point of this is that you cna have 2 projects which target the different CLR's but contain the same code and namespace references ... you can leverage these to have code that works on both versions of the CLR very simply.
Its really quite powerful. I have one set of tests that can target both versions.
Of course you are limited to the set of common functionality but that is implicitly part of your requirements anyway.
You cna even pass the objects over a service and have them deserialise nicley into the other CLR. Kinda suprising how well you can use the symetry
I am currently using this for aproject and am achieving what you want and after a few hours of playing with really suprisingly painless.
regards

How to prune Zend Framework?

I wouldn't use most of the classes from Zend Framework, that's why I'm looking for the thinnest possible ZF configuration.
Is there a better way of finding what I really need other than deleting the whole library/Zend folder, then putting back files based on the error messages that I receive?
I have not used it myself, but http://blog.fedecarg.com/2009/02/01/zend-framework-automatic-dependency-tracking/ may be what you are looking for.
Hm...
There is a lot of information about Zend Framework on SO and with a little bit of reading you would have found the answers to your question
You would also find the answers to your question by just reading the introduction to Zend Framework on the Zend Framework website.
No, that's not how you'll do it. Zend Framework, unlike most/all other PHP frameworks, is rigidly loosely coupled. You can use every component stand-alone. You can only use the loader, or only Zend_Translate. Or you can just use the MVC modules, or Zend_Db, etc.
Of course if you use Zend_Form and want to validate or filter the input, you'll need Zend_Validate and Zend_Filter. But you'll know that because you'll instantiate objects. So just copy into your empty library folder the modules you need. Or even better, copy everything in! A) you won't regret it. B) disk space is not your problem.
What I would do is set up the plugin loader cache and then purge all files apart from the ones called within the automatically generated include file.
zend.loader.pluginloader.performance
I hope it makes sense... :o)