Skip to main content

Posts

Showing posts from November, 2013

iOS Dev: Design pattern are used on iOS Development other than MVC

Hi Friends, Here the some list of design pattern with sort description What is  Design Pattern ? A design pattern is a common solution to a software problem. They are helpful for speeding up problem solving, ensuring that a developer doesn’t have to re-invent the wheel for every situation. They also give developers a common vocabulary with which to get across high-level ideas with minimal explanation and full understanding. Design patterns are everywhere in  iOS  Developement,Because iOS is a fairly specific platform, developers often face similar problems over and over, so there are a few design patterns that are extremely common in iOS. Here is a short list of design patterns used by software engineers: Abstract Factory Pattern Adaptor Pattern Object Modeling Pattern Chain of Responsibility Pattern Command Pattern Composite  Pattern Decorator Pattern Façade Pattern Iterator Pattern Mediator Pattern Memento Pattern Model-Vi...

JavaScript to validate Price input into a TextBox

Guys, first time in my life I am writing JavaScript for one of my project. I need a client side validation for an input into asp:TextBox. I wrote a JavaScript function that would, actually, take whole element as object and use a regex to match the input with a pattern. I learned that we don’t need to create an object of a RegEx() as we do in C#. A “var” variable has “match” function that will use regex pattern to match the input. Below is the javascript function that I wrote to validate my input.   < script language ="javascript">     function validatePrice(textBoxId) {         var textVal = textBoxId.value;         var regex = /^(\$|)([1-9]\d{0,2}(\,\d{3})*|([1-9]\d*))(\.\d{2})?$/;         var passed = textVal.match(regex);         if (pas...