Monday, 27 April 2015

Software for finding JSP from PHP

An article I wrote a long time ago, when I was visibly frustrated. Gotta say it can't get worse that this.

Here is the problem. We work on large projects (very very large projects). The UX team (or UI team) or whatever you call the people who design the pages in PHP, keep sending us the classes and the structure of the HTML file. We (software developers) create a JSP as per the guidelines of the PHP drop. However, in due course of time, the project expands to gigantic proportions and we find ourselves buried under a big load of JSP files that look almost similar or at least sound similar (searchResult.jsp, advancedSearchresult.jsp, etc.). So far, so good. 
Now, in their infinite wisdom the UX people (who work on Photoshop but brag otherwise), decide to change some class or make some slight amends in the structure. This change is forwarded to us and  it becomes OUR responsibility to reflect it in the JSP file. However, the catch is that now there are so many JSP files that it takes hours to find where the changes should be reflected. Worse still, if you have joined the project recently and you are asked to make those minor changes, you are doomed for the day. 

If only..............there would have been something that could search the entire workspace/sandbox/code and find the JSP matching the PHP file.........ummmmm.........well just asking.......  

Sounds familiar?????? Isn't it something we all expected when we installed our programming editor (Eclipse, NetBeans, etc.). A single click and the JSP comes out of nowhere. With so many functionality, couldn't the editor add just one more search tool for this purpose. I wish it had but the unfortunate answer is NO. There is no such add on, plugin or extension that could make our life easier. 

Solution : "It depends whether you see the glass as half empty or half full." We can take this situation as an opportunity to work on a plugin. Many open source editors are widely in circulation (Eclipse IDE , for eg.). All we need is some understanding of the software and a little effort. Best part, we have nothing to loose. I have thought about it for some time and it sounds like a great venture but there are some loopholes as well. For example -

If the original PHP was -                                          The original JSP would be-

<div>                                                                            <div>
        <p>                                                                                <p>
         -------------------                                                         -------------------
         -------------------                                                         -------------------
         -------------------                                                         -------------------
         </p>                                                                               </p> 
</div>                                                                            </div>

Now, if the original PHP is altered and a fresh PHP drop comes, with a structure like -


           The software (if created), will go nuts while trying to figure out the original JSP. In large projects (and hard luck days), it will come up with some other JSP with the newly specified structure but totally different functionality. Hence a semantic analysis would also be needed along with a parsing tool. 

All in all it's just an idea friends. I came up with it after days and months of frustration during code merge or alignment issues. Give it a thought, if you can or better still, WE CAN, come up with something like that, then  programming on front end will truly become a bliss.

No comments:

Post a Comment