functionality

how do you separate presentation(XHTML) and functionality (PHP code)?

What is better...make classes specially for rendering html, sth. like this: class IndexHTML { public $doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"&gt;"; public $title = "<title>MICE</title>"; //title of document public $contentType = "<meta http-e...

Adding many frameworks to a Java application - will it have any negative side effects?

If one adds many framework dependencies to a Java application, will this increase its memory footprint drastically, because it preloads all libraries at startup or is that a more lazy behaviour which would load only the needed classes when you actually need it (e.g. import statements or even later)? Could adding many dependencies also h...

Jquery site questions

im developing a site heavily based on jquery and involving wordpress. is there any way to navigate between pages without reloading the whole thing, other than simple hide/show functions or with hide/show how can i link to a certain part of the site? for example if the home page is a heap of divs <div id="1"> <p>content here</p> </div> ...

search functionality

How can i implement search functionality otherthan sqlquery,joins and conditional querys ...

MySQL: How many queries per page is too many?

I'm new to MySQL and something that's quickly becoming obvious to me is that it feels considerably easier to create several database queries per page as opposed to a few of them.... but I don't really have a feel for how many queries might be too many, or at what point I should invest more precious time to combining queries, spending tim...

What is the correct way of ensuring a single instance of a class?

In java I would create something like this: private static MyClass instance; public static MyClass getInstance() { if(instance != null) { return instance; } instance = new MyClass(); return instance; } What is the appropriate way to obtain the same functionality in ruby? Update: I've read about 'include Singleton' but wh...

How does QA verify that existing product functionality is still working while verifying new product features and functionality?

How does QA verify that existing product functionality is still working while verifying new product features and functionality? ...

Iterating over consecutive sublists in Python

Does Python offer a way to iterate over all "consecutive sublists" of a given list L - i.e. sublists of L where any two consecutive elements are also consecutive in L - or should I write my own? (Example: if L = [1, 2, 3], then the set over which I want to iterate is {[1], [2], [3], [1, 2], [2,3], [1, 2, 3]}. [1, 3] is skipped since 1 a...

multiple classes with same methods - best pattern

I have a few classes in my current project where validation of Email/Website addresses is necessary. The methods to do that are all the same. I wondered what's the best way to implement this, so I don't need to have these methods copy pasted everywhere? The classes themselves are not necessarily related, they only have those validat...

Unsure how to design JavaScript / jQuery functionality which uses XML to create HTML objects

Hi, I'm using JavScript and jQuery to read an XML document and subsequently use the information from the XML to create HTML objects. The main 'C' nodes in the XML document all have a type attribute, and depending on the type I want to run a function which will create a new html object using the other attributes assigned to that particu...

Stackoverflow like Question Asking Functionality

I want to create Stackoverflow like Question Asking Functionality. I have noticed as soon as cursor is move from Title textbox to Question, it is showing related links, without doing page postback. I want to doo something similar to that. How can I perform this? ...

Add functionality to Windows.Forms exit button?

Programming in C#.NET 4.0 is my latest passion, and I would like to know how to add functionality to the standard Windows.Forms Exit button (the red X in the upper right corner of the form). I have found a way to disable the button, but since I think it compromises the user experiance, I would like to hook up some functionalities instea...

Adding Custom functionality to jquery slider.

I need to create a custom image slider with some functionality that I've never seen before. I'd like to use an existing jquery slider if I could (something like - http://nivo.dev7studios.com/) and then customize it but I'm really not sure were to start. I need to have 4 boxes each with a small image within. Below would be a slider that...

Internal product documentation

We have a system that has grown over a number of years (ASP.NET Web Forms, MySQL) and we're looking for guidance on what to document about it and how to document it so that we have a single place we can go to understand how the system should behave. This documentation would allow both developers and testers recognize what might be affec...

How to deploy customer-specific functionality

I have a domain-specific application that is used by a few customers. The customers each have their own specific requirements. Sometimes extra fields, sometimes different rules and funcitonality. The domain objects change very little but the customer. Because the domain objects are fairly static I opted for anemic domain model with fi...

When to use class::function or class->function, is there a preferred method?

Possible Duplicate: In PHP, whats the difference between :: and -> ? I've been seeing this class::function more in some code examples and thought it was the same as this class->function, but I wanted to know if there is a use case as to when I would use one over the other? ...

Help regarding functionality and technical documentation

I ve completed a web application and now i want to prepare functionality and technical documentation for the same. But i ve never done such documentations. Can someone provide how to prepare such documentations. What are the necessary points to be included in functionality and technical documentation? What are the factors to be conside...

JavaScript over/under usage. what is acceptable these days?

As a budding web developer I'm trying to walk the fine line of cross-platform usability/compatibility and pizazz(functionality). Is this as much as a problem as it was a few years ago? The parts of my site that - dare I say - require (aka make my life easier) JS would not be something that a mobile would want to access (although it cou...

Using the back button to reverse the effects of AJAX in my web application

I am using ajax to load into an element on my page, but I want this action to be reversed with the back button ... I'd rather the URL change to a real URL like mysite.com/page1 rather than mysite.com/page#page1 I read somewhere about using a hidden iframe to achieve this ? Can anyone help me out? ...