Is there any analog of ASP.NET master page in pure JSP? - asp.net

Pls give a link with sample if possible

Sorry, didn't read your question properly.
The answer would be: no.
But, if you can use JSF, Facelets templates are pretty similar to ASP.NET master pages.

According to this article, JSP does not have an equivalent technology:
Although various JSF IDEs offer page
templating to a certain extent such as
IBM page templating, there is not yet
a uniform easy way to build page
templates such as how you use
Microsoft "Master Page" templating
technology.

No, not really. Here is an idea of how you might put one together that sort of works like ASP.NET.

ASP.NET master page is a templating technology. JSP itself is already less or more a templating technology. There's under each the <jsp:include> tag to include templates. You can use it dynamically with EL, but it is however not very advanced/enhanced. Facelets has brought changes in it.
JavaServer PagesTM (JSPTM) technology, previously used as the presentation technology for JavaServer Faces, does not support all of the new features available in JavaServer Faces 2.0. JSP is considered as a deprecated presentation technology for JavaServer Faces 2.0.
On Facelets you can use JSF, which is a component based MVC framework like ASP.NET MVC.
Alternatives outside the Java EE API are Apache Tapestry and Apache Tiles.

Related

alternate of Masterpage of ASP.Net in JSF

I got stucked in search of finding alternate of Master page in JSF.I want to convert a web application developed in ASP.Net into JSF.Now when i collided with this application's Master page , then I thought it can be handled by facelets but still I don't know that Is it right approach? Here's the thing, I found that facelets are alternate of user controls of ASP.net So can I use them for Master page?Even this thing clicks me that i am going wrong
Thanks
It's indeed Facelets. Your only other option is JSP, but it doesn't offer any templating capabilities like ASP.NET MasterPages and Facelets. Even more, JSP is deprecated since JSF 2.0.
See also:
Java EE 6 tutorial - Facelets
Facelets 1.x developer guide (skip chapters 1.1-1.4 for Facelets 2.x)
How to include another XHTML in XHTML using JSF 2.0 Facelets?
When to use <ui:include>, tag files, composite components and/or custom components?

developing with ASP.NET using framewok

I have been working for 4 years as a PHP developer and I'm currently transferring to ASP.NET (Since I have 4 years of C# experience too, and selected PHP because of specific conditions - now I wish to use my C# knowledge and the .NET Framework is impressive).
When developing with PHP, I always use a framework - or something I've wrote myself (I'm working as a software architect...) or Zend Framework / Yii etc - the reasons is lack of classes, tools and OOP in PHP (such as MVC, ACL, Cache etc.)
When working with ASP.NET MVC 3, I see that combining the MVC framework and the general .NET framework I have many tools, and here is my point: when developing in ASP.NET, do you need to use any other framework than .NET? (just like in PHP I'm using Zend).
If so, there's any recommended frameworks?
Thanks! :)
In a .Net world, there are many options infront of you. see below popular vendors;
www.devexpress.com
www.telerik.com
www.comonentone.com
www.infragistics.com
But most of the time, asp.net is perfect itself. And when you are talking about mvc3. You can use another view engine instead of using Razor(the default one) such as spark. So, i mean that asp.net itself can be expended accroding to your needs.
And when you are working with mvc3, then you have best choice which entity framework. There is alot of support out there for this framework. So good luck in this.
Yes, there are other frameworks that you can choose to use alongside .NET MVC - but I myself haven't chosen to utilize them in any recent projects. Here are a few examples aside from what others have already pointed out:
http://www.springframework.net/
http://sparkviewengine.com/
That said, while I don't personally use frameworks like I mentioned above here in no particular order are a few tools that I have found that I have come to rely on while developing applications within ASP.net MVC:
Fluent Nhibernate - If you choose to use Nhibernate as your ORM
Ninject - Dependency Injector
AutoMapper - object - object mapper
ELMAH - error logging facility
lg4net - logging etc
Check out Telerik http://www.telerik.com/ They have some great tools like their RadGrids and specific imput textboxes that once you get used to will save a ton of time and add a lot more flexibility. Definitely worth a look.
No THE framework has everything you normally need. But the amount of tooling available is tremendous! We use asp.net 4.0 but we choose DevExpress controlls to get nice look and feel and functionality that would cost too much to build myself.
We worked with almost every component builder in the last 10 years but DevExpress is our favorite for one simple reason. Super fast support! And I agree with the above comment about Infragistics very disapointing support!
But again those vendors or other community frameworks are there too make our life even simpler. By itself THE framework can solve almost everything from THE core libraries.
Good luck switching to C# again my favorite language too!

Which GUI framework/component should I use. I am using Spring MVC with Java and intend to create web applications

Which GUI framework/component should I use. I am using Spring MVC with Java and intend to create web applications
I was looking for something similar to primefaces. But it seems that primefaces only works with spring web flow. I believe only a certain category of applications can be created with spring web flow which could be a negative point for using primefaces with spring.
I could use jquery but the jquery is not as good as primefaces when it comes to quickly creating web pages...
Thanks for the help guys..
I suggest you to have look at Thymeleaf [ http://www.thymeleaf.org ] as a template engine, combined with either mere jQuery or (as you say you consider it a bit too simple) jQuery + backbone.js (which is a javascript MVC framework) [
http://documentcloud.github.com/backbone/ ]
The client side would be well covered with these two js libs, and thymeleaf's javascript inlining capabilities would ease integration a bit...

Templating engines for Asp.net

Are there any third-party Templating Engines for Asp.net like we have smarty,savant for php ?
Spark: http://sparkviewengine.com/
Your question does not explicitly states what "breed" of ASP.NET you are using, so I guess it is most likely web forms. If this assumption is correct, I would not recommend for you to replace the default view engine. In order to make good use of the build in controls, you really want to keep the abstraction where HTML like elements can be marked runat=server and accessed from the server side code.
If you happen to use ASP.NET MVC, the picture is completely different. Here, there are lots of different view engines available - including NDjango, NHaml, Spark. If you are the type of web developer who care about the templating engines, you are likely to prefer ASP.NET MVC as a whole, and you might want to check it out before starting your next project.

sparkviewengine alternative for WebForms project

I like the html dominated structure of the sparkviewengine very much.
Is there a version of it for WebForms projects?
I want to use it for generating presentation only html (I mean, the output will not contain any html input controls).
Or can you recommend an alternative?
VS.Net 2010 Framework 4.0
thanks for your time
Unfortunately, traditional ASP.NET WebForms does not allow the developer to switch out View Engines. There is only one and that's WebForms. Only with ASP.NET MVC did this concept of interchangeable view engines come about which gave you the option.
If the View Engine in traditional ASP.NET was switchable, then you would have been able to use the Spark view engine because it already understands the <%=blah %> syntax and delegates that rendering, but I'm afraid the extensibility points are just not there...
Update
I stumbled across this blog post which talks about using Spark on the WebForms project - you may have some luck following up on that...
Hope that helps,
Rob

Resources