One large include file or several smaller ones?

I am writing some jsp, and I wonder if it would be better to have one large include file that I would include with each page or several smaller ones that I would include only on certain pages as needed.

On any given page, you only need to call a few methods (<5). If I use one file, it will be more than 2500 lines of code.

My main concern would be performance with a secondary maintenance concern.

We use the jsp include directive. <%@ include file="FileToInclude" %>

Edit: I will do the same for asp pages.

+3
source share
5

, JSP, . , JSP, .

JSP - .

, out JSP, . , Java, JSP, JAR :

  • IDE Java.
  • JSP - HTML JSP ( Java), .
  • Java, HTML-.
  • JSP, Java Java.
  • JSP .
+5

JSP . - JSP , Java. , Model-View-Controller. .

+2

Java? .

, , , .

+1

ASP - ,

//, , include , -

+1

ASP include, ... 5 . , ( ), , .

0

Source: https://habr.com/ru/post/1707066/


All Articles