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 -

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

           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.

Tuesday 21 April 2015

Pratham Software

Pratham Software

Round I:
  1. What is a controller in spring MVC?
  2. Where is the mapping for a controller?
  3. In which files is the controller?
  4. What are the annotations used in a controller?
  5. How does AJAX calls hit the controller?
  6. How does the controller decide which view to show for which method?
    Talking about web.xml in any of the above questions did not cut any ice. He was expecting something very different.
  7. Can you write business logic in controller?
  8. Controller, controller, controllercontrollercontroller and more controller.
    This guy was totally obsessed with controller.
  9. Execution process of a hit in spring MVC.
  10. How does a Dispatcher Servlet work?
  11. What do you know about JavaScript and JQuery?
  12. What are the various objects involved in a JavaScript?
  13. Difference between a SOAP and REST call?
  14. What is a WSDL?
  15. What is the full form of WSDL?
All this and lot more about web services, spring MVC and dear ol' controller.

Saturday 18 April 2015

Born Group

Questions:

Round I:
There were very long uncomfortable pauses between each question.
  1. What all modules in hybris have you worked upon?
  2. How to use the REST webservices of hybris?
  3. How to use the SOAP webservices of hybris?
  4. How to create a SOAP client?
  5. How to do a server side validation using Spring?
  6. What all classes are in Collections framework?
  7. Difference between ArrayList and LinkedList?
  8. How to define a cronjob in Hybris?
  9. How to customize solr?
  10. How does data from solr comes to Product listing page?
  11. What is association?
  12. How to implement association in hybris?
  13. Which element implement association in hybris in items.xml?
  14. Implementing cardinality in hybris?

    Lots of questions about web-services, spring MVC and their implementation in Hybris.
Round II:
    1. What is deployment table in hybris? How is it stored internally?
    2. Entire story about WCMS?
    3. Simple database table to store details of a family and their relations.
    4. How to override a service or any bean in java? What are the best practices?
    Round III:
    HR round
       This is where it gets interesting. The HR's have a mood swing. One moment they are the nicest, coolest most co-operating saints in corporate industry. Next moment they turn angry, fussy, exceptionally dumb, bullies. And then they turn back to their efforts for canonization. Just bear with their antics and any revolutionary idea that they come up with. Having said that these guys like to believe that they are an elite club of hybris nerds. And this means that they won't mind dolling out large lumps of CTC to pump their egos. Good for them, good for us.
    My advice is that negotiate hard, they are willing to walk the extra mile.