sirganeshv / Seminar

0 stars 0 forks source link

Remove code smell #18

Open sivaraam opened 7 years ago

sivaraam commented 7 years ago

Currently the code is starting to smell a little. The code currently smells (atleast, as far as I could see) in the following ways relating to the linked article,

Speaking a little about the last point. This was my view of code base (before the day of reckoning, when all was good),

------------------------------------------------
|                  Presentation                |
|                                              |
|                   HTML, CSS                  |
|                                              |
------------------------------------------------
|                   Logic                      |
|                                              |
|                    JS                        |
|                                              |
------------------------------------------------
|                   Data                       |
|                                              |
|                   JSP                        |
|                                              |
------------------------------------------------

But it doesn't work that way any more. Currently (in the day of reckoning) the view seems something like,

------------------------------------------------
|                 Presentation                 |
|                                              |
|                HTML, CSS, *JSP*              |
|                                              |
------------------------------------------------
|                   Logic                      |
|                                              |
|                    JS                        |
|                                              |
------------------------------------------------
|                   Data                       |
|                                              |
|                   JSP                        |
|                                              |
------------------------------------------------

That look so good, does it?

A few arguments regarding why the second one isn't so good,

  1. It violates the Single responsibility principle and also spoils Separation of concerns

  2. For those who say, I like to exploit the advantage of JSP. It makes work, a hell, lot easier. Apart from the above fact,

    • Have you really taken advantage of all that was available to you in real life ? Really ?

      Life always requires trade-offs

  3. If you still What's the big deal ?, all I could say is ALL THE BEST

sivaraam commented 7 years ago

And yeah, here are a few issues with JSP that you may want to note.

sivaraam commented 7 years ago

19 is a part of this issue.