Features and benefits
PageMethods provides a solution for the limitations of
the standard way of handling pages, URLs and parameters.
The usual way to proceed is not structured. With PageMethods, the code of
your pages is simpler, cleaner and more reliable.
The approach is based on strict page inputs and declarative
parameter binding. With PageMethods, each page exposes a set of methods that
represent the different ways to call the page.
All you have to do to start benefiting from sharp URLs is to add methods to your pages, and mark these
methods with attributes provided by PageMethods.
This approach has a number of benefits:
Improve your ASP.NET web sites and applications
PageMethods enables more reliable web applications, with
less risk of failure. All that with a simpler source code.
- No concatenations of strings required anymore to link to
pages and pass parameters - The code is shorter, easier to read, and safer.
String concatenations are not structured and are error-prone.
- Strongly typed parameters - Page parameters become strongly typed and automatically validated.
- Compile-time checks -
If you make a mistake
or a change breaks a link, you'll know as soon as you compile.
Using the standard way, you learn about problems when someone tries to access the pages.
This means that you're never sure what you deliver is 100% safe. When you
realize you've made a mistake, it's late and you have to redeploy the
application after fixing the problem.
Ease of use and productivity
PageMethods' clean and simple approach improves legibility, maintainability and productivity.
- Natural, object-oriented approach
- Getting a list of ways a page can be invoked is as simple
as for any other object. When you link to a page, you always know what
parameters or combinations of parameters this page expects.
- Code completion -
Code completion helps you
when you refer to a page by presenting the list of available methods and their parameters.
- Greater agility - Adapting to changes is fast, and all aspects of a change are taken into account at once.
- Less code to write - Improves productivity by requiring less work for the developer of a page AND for the caller of this page.
- Right from your development environment - PageMethods comes with an add-in to Visual Studio .NET to help
you improve your page handling. You don't have to leave your code or your
development environment. The add-in allows magic to happen during the compilation, in an automated and transparent way.
- Easy and non intrusive - You just have to add some attributes to your code, and the magic happens during the compilation.
Everything happens in one place, at the page level.
- Automated parameter handling - You don't have to parse and convert parameters by yourself. In ASP.NET,
parameters passed on URLs are available through Request.QueryString, only as strings.
- Parameter validation - PageMethods provides a declarative approach with automation of tedious
parameter processing. You don't have to validate by yourself the parameters a page receives. Validation of the type of each parameter, checks for null
parameters, and checks that parameters are within the range of valid values are automated.
- Pages are self-describing, self-documented - No need to look at a target page's code to know how to call it. No need for separate
documentation about ways to call a page.
- Supports C# and VB.NET.
Flexibility
- Parameter aliasing and formatting - A custom name and format can be specified for each URL parameter.
- URL aliasing - You can specify formats for your URLs. This is useful if you use URL rewriting, for example.
Additional advantages
PageMethods brings more than just a solution to the
limitations of the standard way of handling pages and links. Consider the the
following additional advantages:
- Facilitates unit testing - Valid calls for each page are well-know and can be invoked easily.
- You can get a list of the available pages, and details about each page. This can be used for documentation purposes.
- More to come...!
To sum up, with PageMethods, you easily get well-defined URLs, sharp URLs.