I have been looking at the Scala web framework Lift. I recently saw something called Wiring and was wondering if someone could explain the benefits to me, as an application programmer.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Wiring gives you the ability to declare relationships among different elements on an HTML page and as predicate values change, the dependent values will automatically be updated on the page.
Think about the difference between a spreadsheet and a Java/Scala program. In a spreadsheet, you can declare complex inter-relationships among cells and when predicates change, the cells automatically update. Writing a program that reflects even a pretty simple spreadsheet will typically run into the hundreds or thousands of lines and be very difficult to maintain.
A concrete example is a shopping cart. Think of all the pieces of a web page that must be updated when you put something in a shopping cart. Writing the initial screen may not be hard, but then think about the maintenance complexity (okay, what do I have to update when something gets added to or removed from the cart, when the zip code changes, etc.)
What wiring gives you is the ability to declare relationships and no matter how the predicates change (e.g., tax rules change based on zip code, but anything that depends on taxable subtotal is updated when the tax rules change), the developer doesn’t have to understand all the dependents that must also be updated.