Skip to main content

Home/ ProgrammingPages/ Group items tagged http

Rss Feed Group items tagged

Navneet Kumar

Ken Arnold's Blog: Generics Considered Harmful - 0 views

  • this: Enum is actually a generic class defined as Enum<T extends 
  • When used in public interfaces, generics are also invaluable to enforce correctness, prevent bugs and reduce testi
  • generics is reifying type relationships that are otherwise implic
  • ...4 more annotations...
  • The problem is that generics don't get on with arrays. The solution is obvious: ditch arrays. From a practical point of view, there's not a great deal of point in returning arrays from methods instead of collections of s
  • Note the circular reference in "Unique<T extends Unique>" It means that the implementing class needs to provide another unique class as the namespace for it's Id's. The really freaky thing is that it can provide itself. :) These two interfaces enable a way to describe uniquely identified objects with heirarchical namespaces in a typesafe manner. How much complex code did that save?
  • ype". You only need generics in strictly typed function dispatch languages like C++ and Java. You don't need them in message passing dynamically typed languages like Smalltalk and Objective C. To work around the first rule - "strict static typing doesn't really work all the time", we get hacks like templates and generics
  • call the Elvis/Einstein b
  •  
    discussion on java generics, too complex, dangerous or useful, type safety, when n how to use
Navneet Kumar

Java(TM) Boutique - The Spring Framework - 0 views

  • spring does not impose itself wholly on to the design of a project. Spring is modular and has been divided logically into independent packages, which can function independently.
  • encourages users to introduce Spring into existing applications in a phased manner. So no matter what kind of framework you are using now Spring will co-exist with it without causing you nightmares and further more Spring will allow you to choose specific packages in Spring.
Navneet Kumar

Javascript Closures - 0 views

  • If a value is assigned and the actual object does not have a property with the corresponding name a property of that name is created and the value is assigned to it. If it has the property then its value is re-set.
  • all objects may have prototypes, and prototypes are objects so they, in turn, may have prototypes, which may have prototypes, and so on forming what is called the prototype chain. The prototype chain ends when one of the objects in the chain has a null prototype. The default prototype for the Object constructor has a null prototype so
  • When a javascript function is called it enters an execution context, if another function is called (or the same function recursively) a new execution context is created and execution enters that context for the duration of the function call. Returning to the original execution context when that called function returns. Thus running javascript code forms a stack of execution contexts
  • ...5 more annotations...
  • First, in the execution context of a function, an "Activation" object is created.
  • The next step in the creation of the execution context for a function call is the creation of an arguments object, which is an array-like object with integer indexed members corresponding with the arguments passed to the function call, in order.
  • Next the execution context is assigned a scope. A scope consists of a list (or chain) of objects.
  • the Activation object is used as the Variable object (note this, it is important: they are the same object). Named properties of the Variable object are created for each of the function's formal parameters, and if arguments to the function call correspond with those parameters the values of those arguments are assigned to the properties (otherwise the assigned value is undefined)
  • It is the fact that the Activation object, with its arguments property, and the Variable object, with named properties corresponding with function local variables, are the same object, that allows the identifier arguments to be treated as if it was a function local variable.
  •  
    Detailed description of How javascript lanaguage handles resolution of property names, scopes of the functions, the importance prototype, and how closures are ultimately formed taking into consideration the above facts
Navneet Kumar

Blacktree - 0 views

shared by Navneet Kumar on 01 Nov 07 - Cached
  •  
    UuSER INTERACTION
Navneet Kumar

JavaScript Closures for Dummies | Developing thoughts - Morris Johns - 0 views

    • Navneet Kumar
       
      good one. shown with exaples
Navneet Kumar

MySQL AB :: High Performance MySQL Chapter 6: Server Performance Tuning - 0 views

  •  
    performance tuning for high performnace mysql
Navneet Kumar

www.dontclick.it - 0 views

shared by Navneet Kumar on 23 Oct 07 - Cached
  •  
    ui design without mouse click
Navneet Kumar

Inversion of Control Containers and the Dependency Injection pattern - 0 views

  • The main difference is that I expect a component to be used locally (think jar file, assembly, dll, or a source > > i mport). A service will be used remotely through some remot >e > i nterface, either synchronous or asynchronous > >
  • configuration through XML files and also through code
    • Navneet Kumar
       
      or can be stored in a DB table
  • dynamic service locator
  • ...16 more annotations...
  • Dependency injection and a service locator aren't necessarily mutually exclusive concepts.
  • With service locator the application class asks for it explicitly by a message to the locator. With injection there is no explicit request, the service appears in the application class - hence the inversion of control.
  • with a Service Locator every user of a service has a dependency to the locator. The locator can hide dependencies to other implementations, but you do need to see the locator.
  • In this kind of scenario I don't see the injector's inversion as providing anything compelling.The difference comes if the lister is a component that I'm providing to an application that other people are writing. In this case I don't know much about the APIs of the service locators that my customers are going to use. Each customer might have their own incompatible service locators
  • Since with an injector you don't have a dependency from a component to the injector, the component cannot obtain further services from the injector once it's been configured.
  • frameworks should minimize their impact upon application code, and particularly should not do things that slow down the edit-execute cycle. Using plugins to substitute heavyweight components does a lot help this process, which is vital for practices such as Test Driven Development.
  • a more general issue with object-oriented programming - should you fill fields in a constructor or with setters.
  • Another advantage with constructor initialization is that it allows you to clearly hide any fields that are immutable by simply not providing a setter. I think this is important - if something shouldn't change then the lack of a setter communicates this very well
  • The problem with classic Factory Methods for components assembly is that they are usually seen as static methods, and you can't have those on interfaces. You can make a factory class, but then that just becomes another service instance. A factory service is often a good tactic, but you still have to instantiate the factory using one of the techniques here
  • Factory Methods
  • start with constructor injection, but be ready to switch to setter injection
  • One case is where you have a simple application that's not got a lot of deployment variation. In this case a bit of code can be clearer than separate XML file.
  • configuration files or code on an API to wire up services
  • the Java world at the moment is a cacophony of configuration files,
  • using aspect oriented ideas with these containers
    • Navneet Kumar
       
      Aspect Oriented Programming AOP. can be possible with IoC.
  • When building application classes the two are roughly equivalent, but I think Service Locator has a slight edge due to its more straightforward behavior. However if you are building classes to used in multiple applications then Dependency Injection is a better choice.
  •  
    article by martin fowler on Inversion of control and dependency injection design patterns which are used in the spring framework.
Navneet Kumar

JavaScript - Strings - 2 views

  •  
    javascript string handling
Navneet Kumar

Perl 5.8.8 documentation - perldoc.perl.org - 0 views

  •  
    official perl docs site
Navneet Kumar

XSS (Cross Site Scripting) Cheat Sheet - 0 views

  •  
    various ways of XSS
Navneet Kumar

MySQL AB :: An Introduction to Database Normalization - 0 views

  •  
    intro to db normalization
‹ Previous 21 - 40 of 97 Next › Last »
Showing 20 items per page