Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Standalone applications

 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can spring be used for creating desktop applications?
 
Tim Moores
Bartender
Posts: 2842
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Creating" is too strong a word, i think - Spring is not a GUI framework, after all. But you can certainly use it in a desktop app.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
will i be benefited by using it in desktop application? I think no. Give your suggestions
 
Tim Moores
Bartender
Posts: 2842
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring provides many services, every single one of which may or may not benefit your particular application. See its extensive online documentation for all the things it can do. Dependency Injection (DI) is one of things it's widely used for.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for your reply.

Since it is not a GUI framework, i will have to use it inside APPLET or SWING code. What do you suggest?
 
Tim Moores
Bartender
Posts: 2842
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suggest for what?

"applet or Swing" - this does not make sense. You can write applets that use Swing, and you can write applets that don't use Swing.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean using Spring inside applet code. Does that make sense? Any benefit of doing in such a way?
 
Tim Moores
Bartender
Posts: 2842
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would be unusual. Most applets do not need the kind of configurability that DI provides. I can't speak to the other Spring features.

But I think you're going about this the wrong way - instead of asking "does it make sense to use X in context Y" you should be asking "what do I need to do in context Y?" and "which tools could help me with that?"
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay. I should had tell you earlier, so, my fault. I am presently making a website. So i was thinking of developing it with Spring , Hibernate & java(excluding servlets,jsp). Is it possible?
 
Tim Moores
Bartender
Posts: 2842
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I'm really confused. What does a web site have to do with Swing and desktop apps (which is what you asked about)? If this is a different question then you should start a new topic in an appropriate forum.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh yes. I messed it up. Sorry
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kunal Lakhani wrote:Okay. I should had tell you earlier, so, my fault. I am presently making a website. So i was thinking of developing it with Spring , Hibernate & java(excluding servlets,jsp). Is it possible?


OK, good question here. You want a website but no Servlets/JSP. Sounds like you are sick of them as I am. And I happen to be developing a web app with Spring and Spring MVC and JQuery. Still HTML, but in terms of Servlets/JSP it is still based on top of it, but I only have one Servlet from Spring, the DispatcherServlet, and only one .jsp page which doesn't use any dynamic data so just to start up the html. All the rest is done via REST Ajax calls from the browser to the server.

For complete removal of Servlets/JSP you can look at the Play Framework, and you can still use Spring behind it if you wanted to.

Good Luck

Mark
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark.
But i a m unaware of Ajax, and jquery. I will be using only Spring Hibernate.
 
Tim Moores
Bartender
Posts: 2842
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kunal Lakhani wrote:But i a m unaware of Ajax, and jquery. I will be using only Spring Hibernate.

That, too, doesn't make sense. Spring and Hibernate are server-side frameworks, while AJAX and jQuery are tools for the browser<-->server interaction. Using one has little impact on using the other. I think you still haven't asked yourself why you would want to use any of these tools, because -frankly- you seem unsure about what they can do for you. I suggest to read up about each of these frameworks, and only then deciding whether it makes for you to use any of these, instead of starting out by saying "I will use X and Y, but not Z". That's not how code is designed.
 
Mr sujeet khandelwal
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kunal,

It is not mandatory to use jquery and AJax for web site.
Spring is a framework which can be used at any layer of application.
At presentation layer you can use spring MVC and at logic layer you can use spring-hibernate integration for db interaction.


 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for your valuable suggestions.
Thanks Mr sujeet khandelwal, Mark.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic