Modules and WebApps

Hi, I didn't find this discussed yet, so I'll post in the hopes that I'm
not duping the info.

I've setup 3 modules using the tools/edit module menu.

I like the idea of what Modules are going to be, however now I have a
web app which under the old way of doing things would compile what ever
was in the source path into the directory I need it to go in, and the
app would start.

Under this new paradigm, I click the start button for the web app, and
nothing gets compiled. That's not surprising since none of the modules
have a web app related to them, and the web app has not modules related
to IT.

So my questions are:
1- Am I missing a setting somewhere? Can this not be done yet?
2- Are we going to be able to relate modules to web apps or vice versa?

Ideally I'd like to setup my modules, then edit a web app and say module
a, b and e need to run with this web app configuration. The modules
would need to compile into the directory the web module specifies (so
all in one location). I don't think it would be right for the modules
to still compile into their own dirs in the case of a web app, that
wouldn't make any sense, since much of the web app code is run from
either WEB-INF/classes or WEB-INF/lib

is this going to be a problem??? Do I need to file an SCR for this?

R

10 comments

I want to add to this that usually the modules for the web-apps are in
fact web app specific, so even in the case where I have a src/common
source folder, it would be just fine to add common with every module in
order for common source files to compile in various webapp classes
directories.

I still don't see a way to get the webapp to fire off a compile of all
class files on startup. We really need that to happen, otherwise
modules are pretty useless for webapps.

R

Robert S. Sfeir wrote:

Hi, I didn't find this discussed yet, so I'll post in the hopes that I'm
not duping the info.

I've setup 3 modules using the tools/edit module menu.

I like the idea of what Modules are going to be, however now I have a
web app which under the old way of doing things would compile what ever
was in the source path into the directory I need it to go in, and the
app would start.

Under this new paradigm, I click the start button for the web app, and
nothing gets compiled. That's not surprising since none of the modules
have a web app related to them, and the web app has not modules related
to IT.

So my questions are:
1- Am I missing a setting somewhere? Can this not be done yet?
2- Are we going to be able to relate modules to web apps or vice versa?

Ideally I'd like to setup my modules, then edit a web app and say module
a, b and e need to run with this web app configuration. The modules
would need to compile into the directory the web module specifies (so
all in one location). I don't think it would be right for the modules
to still compile into their own dirs in the case of a web app, that
wouldn't make any sense, since much of the web app code is run from
either WEB-INF/classes or WEB-INF/lib

is this going to be a problem??? Do I need to file an SCR for this?

R


0

Robert, would not the following scheme suit you:
1. you configure number of Java modules (web app utility modules)
2. configure Web app module to use specific utility modules, and place compiled classes either
- into WEB-INF/classes/...xxx directory
or
- into WEB-INF/lib/...xxx.jar
3. run Make. Utility modules compiled into their own output paths as usual and then corresponding directory or jar copied inside web
app.
Of course, the copy step will be unnecessary, if you set up utility module output paths to point inside web app' WEB-INF in the
first place.

What do you think ?
--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


"Robert S. Sfeir" <no_mail@jetbrains.com> wrote in message news:bn46no$f66$1@is.intellij.net...

I want to add to this that usually the modules for the web-apps are in
fact web app specific, so even in the case where I have a src/common
source folder, it would be just fine to add common with every module in
order for common source files to compile in various webapp classes
directories.

>

I still don't see a way to get the webapp to fire off a compile of all
class files on startup. We really need that to happen, otherwise
modules are pretty useless for webapps.

>

R

>

Robert S. Sfeir wrote:

>

Hi, I didn't find this discussed yet, so I'll post in the hopes that I'm
not duping the info.

>

I've setup 3 modules using the tools/edit module menu.

>

I like the idea of what Modules are going to be, however now I have a
web app which under the old way of doing things would compile what ever
was in the source path into the directory I need it to go in, and the
app would start.

>

Under this new paradigm, I click the start button for the web app, and
nothing gets compiled. That's not surprising since none of the modules
have a web app related to them, and the web app has not modules related
to IT.

>

So my questions are:
1- Am I missing a setting somewhere? Can this not be done yet?
2- Are we going to be able to relate modules to web apps or vice versa?

>

Ideally I'd like to setup my modules, then edit a web app and say module
a, b and e need to run with this web app configuration. The modules
would need to compile into the directory the web module specifies (so
all in one location). I don't think it would be right for the modules
to still compile into their own dirs in the case of a web app, that
wouldn't make any sense, since much of the web app code is run from
either WEB-INF/classes or WEB-INF/lib

>

is this going to be a problem??? Do I need to file an SCR for this?

>

R

>

>


0

Alexey Kudravtsev (JetBrains) wrote:

Robert, would not the following scheme suit you:
1. you configure number of Java modules (web app utility modules)
2. configure Web app module to use specific utility modules, and place compiled classes either
- into WEB-INF/classes/...xxx directory
or
- into WEB-INF/lib/...xxx.jar
3. run Make. Utility modules compiled into their own output paths as usual and then corresponding directory or jar copied inside web
app.
Of course, the copy step will be unnecessary, if you set up utility module output paths to point inside web app' WEB-INF in the
first place.

What do you think ?


Well it would work, except you're telling me that when I hit make, I'm
going to compile ALL modules. I can't pick which ones, which means that
the modules that are not done, and have bugs and won't compile will stop
the whole process of make and it will fail.

I think it doesn't work that way.

I think that you need to add webapp to the module setting and do it the
right way. This way when I run my webapp, I only get the modules I need
to compile.

R

0

I've filed an SCR since it's obvious this is not something you guys
though of.

http://www.intellij.net/tracker/idea/viewSCR?publicId=19606

This is one of the biggest drawbacks of not having you guys work with
JSP/WebApps. You don't see important limitations like this.

R


Robert S. Sfeir wrote:

Hi, I didn't find this discussed yet, so I'll post in the hopes that I'm
not duping the info.

I've setup 3 modules using the tools/edit module menu.

I like the idea of what Modules are going to be, however now I have a
web app which under the old way of doing things would compile what ever
was in the source path into the directory I need it to go in, and the
app would start.

Under this new paradigm, I click the start button for the web app, and
nothing gets compiled. That's not surprising since none of the modules
have a web app related to them, and the web app has not modules related
to IT.

So my questions are:
1- Am I missing a setting somewhere? Can this not be done yet?
2- Are we going to be able to relate modules to web apps or vice versa?

Ideally I'd like to setup my modules, then edit a web app and say module
a, b and e need to run with this web app configuration. The modules
would need to compile into the directory the web module specifies (so
all in one location). I don't think it would be right for the modules
to still compile into their own dirs in the case of a web app, that
wouldn't make any sense, since much of the web app code is run from
either WEB-INF/classes or WEB-INF/lib

is this going to be a problem??? Do I need to file an SCR for this?

R


0


"Robert S. Sfeir" <no_mail@jetbrains.com> wrote in message news:bn69at$mqh$1@is.intellij.net...

Alexey Kudravtsev (JetBrains) wrote:

Robert, would not the following scheme suit you:
1. you configure number of Java modules (web app utility modules)
2. configure Web app module to use specific utility modules, and place compiled classes either
- into WEB-INF/classes/...xxx directory
or
- into WEB-INF/lib/...xxx.jar
3. run Make. Utility modules compiled into their own output paths as usual and then corresponding directory or jar copied inside

web

app.
Of course, the copy step will be unnecessary, if you set up utility module output paths to point inside web app' WEB-INF in the
first place.

>

What do you think ?

>

Well it would work, except you're telling me that when I hit make, I'm
going to compile ALL modules. I can't pick which ones, which means that
the modules that are not done, and have bugs and won't compile will stop
the whole process of make and it will fail.

>

I think it doesn't work that way.

>

I think that you need to add webapp to the module setting and do it the
right way. This way when I run my webapp, I only get the modules I need
to compile.

>

R

>

Each time you hit Make you are going to compile all modules that need to be recompiled.
The feature to compile the separate module is planned for Aurora.
Any other objections ? :)

--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"



0

Alexey Kudravtsev (JetBrains) wrote:

"Robert S. Sfeir" <no_mail@jetbrains.com> wrote in message news:bn69at$mqh$1@is.intellij.net...

>>Alexey Kudravtsev (JetBrains) wrote:
>>
>>>Robert, would not the following scheme suit you:
>>>1. you configure number of Java modules (web app utility modules)
>>>2. configure Web app module to use specific utility modules, and place compiled classes either
>>> - into WEB-INF/classes/...xxx directory
>>>or
>>> - into WEB-INF/lib/...xxx.jar
>>>3. run Make. Utility modules compiled into their own output paths as usual and then corresponding directory or jar copied inside


web

>>>app.
>>>Of course, the copy step will be unnecessary, if you set up utility module output paths to point inside web app' WEB-INF in the
>>>first place.
>>>
>>>What do you think ?
>>
>>Well it would work, except you're telling me that when I hit make, I'm
>>going to compile ALL modules. I can't pick which ones, which means that
>>the modules that are not done, and have bugs and won't compile will stop
>>the whole process of make and it will fail.
>>
>>I think it doesn't work that way.
>>
>>I think that you need to add webapp to the module setting and do it the
>>right way. This way when I run my webapp, I only get the modules I need
>>to compile.
>>
>>R
>>


Each time you hit Make you are going to compile all modules that need to be recompiled.
The feature to compile the separate module is planned for Aurora.
Any other objections ? :)


Yes actually, you're asking me to do more than what I do now. If I
click on make, like I just did, it wants to compile all the modules in
the project, which would be fine IF all the modules compiled, which they
don't. Since they don't, it stops the building process and some modules
are not compiled, hence I can't run my webapp because the compile
process was interrupted by a module which has nothing to do with my
webapp.

Right now with project I just press the run button and everything that
is in my source dir compiles and then runs my webapp. If I do it your
way, I have to remember to hit make, or specifically compile a module
when that's available, then run my web app. Kind of lame. Does it
work? I guess it does, but it's far from developing with pleasure :)

Of course with the way things work now, I have to remove source dirs and
re set them up if I want to have multiple web apps in my project, or I
can run multiple projects, which I do. I'm trying to take advantage of
what is a really great feature; modules.

What should really happen is that when you setup a webapp, add some
functionality in there for dependencies. I mean the webapp setup screen
is as simple as it can get right now, and you also allow the setup of
multiple webapps, but that's pretty dang useless since you can't have a
src dir per webapp. Never could figure out why that would be there.
You're working on the webapps changes anyway. If you add dependencies
and allow us to pick modules, then when a webapp is fired off, just
compile the dependencies. Is this that far off of a chance that it
would cause you a lot of problems? it's a simple, very elegant
solution, which I believe fits right in the context of what you're
trying to do with modules, and seems that it would not take too much
more coding to provide a genuinely excellent feature I think.

I'm not understanding the resistance to implement such a feature I
guess. :)

I'd also recommend you take a little time, I guess at home or something,
and try to be in a JSP/Struts programmer's shoes. Try to have multiple
webapps in a project, setup the modules (use Struts too, it will help
add to the complexity since there are resource files which also need to
be copied properly), setup a webapp, and see if you really honestly like
how it works. I think you'll come to the same conclusion that it's not
very easy to work with, you have to remember too many things before you
run the webapp. It should just be point and click, debug, fix, hotswap,
debug fix... done.

Friendly, yet a bit frustrated that jsp/webapps are still a third class
citizens :)

R

0

Robert, let me summarize your suggestions:
1. Introduce new feature: compile specific module and its dependencies (already open:
http://www.intellij.net/tracker/idea/viewSCR?publicId=15510)
2. Then starting webapp, compile (if necessary) only that webapp and dependant modules instead of the whole project. (already open:
http://www.intellij.net/tracker/idea/viewSCR?publicId=15508)
3. Add configuration option for webapps: "Utility java modules used in that webapp". They should be added to dependant modules list
automatically. Their compilation output should be added to webapp WEB-INF/classes or WEB-INF/lib directory upon webapp make.

Please comment on these and lets add relevant requests to the tracker.
--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


"Robert S. Sfeir" <no_mail@jetbrains.com> wrote in message news:bn8jt6$eeg$1@is.intellij.net...

Alexey Kudravtsev (JetBrains) wrote:

"Robert S. Sfeir" <no_mail@jetbrains.com> wrote in message news:bn69at$mqh$1@is.intellij.net...

>
>>Alexey Kudravtsev (JetBrains) wrote:
>>
>>>Robert, would not the following scheme suit you:
>>>1. you configure number of Java modules (web app utility modules)
>>>2. configure Web app module to use specific utility modules, and place compiled classes either
>>> - into WEB-INF/classes/...xxx directory
>>>or
>>> - into WEB-INF/lib/...xxx.jar
>>>3. run Make. Utility modules compiled into their own output paths as usual and then corresponding directory or jar copied

inside

>

web

>
>>>app.
>>>Of course, the copy step will be unnecessary, if you set up utility module output paths to point inside web app' WEB-INF in the
>>>first place.
>>>
>>>What do you think ?
>>
>>Well it would work, except you're telling me that when I hit make, I'm
>>going to compile ALL modules. I can't pick which ones, which means that
>>the modules that are not done, and have bugs and won't compile will stop
>>the whole process of make and it will fail.
>>
>>I think it doesn't work that way.
>>
>>I think that you need to add webapp to the module setting and do it the
>>right way. This way when I run my webapp, I only get the modules I need
>>to compile.
>>
>>R
>>
>
>

Each time you hit Make you are going to compile all modules that need to be recompiled.
The feature to compile the separate module is planned for Aurora.
Any other objections ? :)

>

>

Yes actually, you're asking me to do more than what I do now. If I
click on make, like I just did, it wants to compile all the modules in
the project, which would be fine IF all the modules compiled, which they
don't. Since they don't, it stops the building process and some modules
are not compiled, hence I can't run my webapp because the compile
process was interrupted by a module which has nothing to do with my
webapp.

>

Right now with project I just press the run button and everything that
is in my source dir compiles and then runs my webapp. If I do it your
way, I have to remember to hit make, or specifically compile a module
when that's available, then run my web app. Kind of lame. Does it
work? I guess it does, but it's far from developing with pleasure :)

>

Of course with the way things work now, I have to remove source dirs and
re set them up if I want to have multiple web apps in my project, or I
can run multiple projects, which I do. I'm trying to take advantage of
what is a really great feature; modules.

>

What should really happen is that when you setup a webapp, add some
functionality in there for dependencies. I mean the webapp setup screen
is as simple as it can get right now, and you also allow the setup of
multiple webapps, but that's pretty dang useless since you can't have a
src dir per webapp. Never could figure out why that would be there.
You're working on the webapps changes anyway. If you add dependencies
and allow us to pick modules, then when a webapp is fired off, just
compile the dependencies. Is this that far off of a chance that it
would cause you a lot of problems? it's a simple, very elegant
solution, which I believe fits right in the context of what you're
trying to do with modules, and seems that it would not take too much
more coding to provide a genuinely excellent feature I think.

>

I'm not understanding the resistance to implement such a feature I
guess. :)

>

I'd also recommend you take a little time, I guess at home or something,
and try to be in a JSP/Struts programmer's shoes. Try to have multiple
webapps in a project, setup the modules (use Struts too, it will help
add to the complexity since there are resource files which also need to
be copied properly), setup a webapp, and see if you really honestly like
how it works. I think you'll come to the same conclusion that it's not
very easy to work with, you have to remember too many things before you
run the webapp. It should just be point and click, debug, fix, hotswap,
debug fix... done.

>

Friendly, yet a bit frustrated that jsp/webapps are still a third class
citizens :)

>

R

>


0

Alexey Kudravtsev (JetBrains) wrote:

Robert, let me summarize your suggestions:
1. Introduce new feature: compile specific module and its dependencies (already open:
http://www.intellij.net/tracker/idea/viewSCR?publicId=15510)


YES!

2. Then starting webapp, compile (if necessary) only that webapp and dependant modules instead of the whole project. (already open:
http://www.intellij.net/tracker/idea/viewSCR?publicId=15508)


YES!

3. Add configuration option for webapps: "Utility java modules used in that webapp". They should be added to dependant modules list
automatically. Their compilation output should be added to webapp WEB-INF/classes or WEB-INF/lib directory upon webapp make.


BINGO!

Please comment on these and lets add relevant requests to the tracker.


What would you like me to do?

Can we expect those for Aurora?

R

0

http://www.intellij.net/tracker/idea/viewSCR?publicId=19904

--
regards,
Alexey Kudravtsev.
JetBrains, Inc
http://www.intellij.com
"Develop with pleasure!"


"Robert S. Sfeir" <no_mail@jetbrains.com> wrote in message news:bnb4jk$tir$1@is.intellij.net...

Alexey Kudravtsev (JetBrains) wrote:

Robert, let me summarize your suggestions:
1. Introduce new feature: compile specific module and its dependencies (already open:
http://www.intellij.net/tracker/idea/viewSCR?publicId=15510)

>

YES!

>

2. Then starting webapp, compile (if necessary) only that webapp and dependant modules instead of the whole project. (already

open:

http://www.intellij.net/tracker/idea/viewSCR?publicId=15508)

>

YES!

>

3. Add configuration option for webapps: "Utility java modules used in that webapp". They should be added to dependant modules

list

automatically. Their compilation output should be added to webapp WEB-INF/classes or WEB-INF/lib directory upon webapp make.

>

BINGO!

>

Please comment on these and lets add relevant requests to the tracker.

>

What would you like me to do?

>

Can we expect those for Aurora?

>



0

Alexey Kudravtsev (JetBrains) wrote:

http://www.intellij.net/tracker/idea/viewSCR?publicId=19904

Very cool, I don't see this as being in Planned version: Aurora. Are
all these things going to be in Aurora or am I going to have to wait
until a later build?

Thanks much for listening Alexey.

R

0

Please sign in to leave a comment.