web-development

Code syntax formatter for posting code on webpages

Is there a utility that will generate html or css for blocks of code (.net c#) when you post it on a website? I have seen several websites with very nicely formatted code and I dont believe they do this manually. Thanks, Alex ...

Will web browsers cache content over https

Will content requested over https still be cached by web browsers or do they consider this insecure behaviour? If this is the case is there anyway to tell them it's ok to cache? ...

How to set property to Guid in aspx page

I have the following code in one of my aspx pages: <% foreach (Dependency dep in this.Common.GetDependencies(this.Request.QueryString["Name"])) { %> <ctl:DependencyEditor DependencyKey='<%= dep.Key %>' runat="server" /> <% } %> When I run it, I get the following error: Parser Error Message: Cannot create an object of type '...

Checking to see if a DOM element has focus.

I've got a lightbox textbox that is displayed using an AJAX call from an ASP.NET UpdatePanel. When the lightbox is displayed, I use the focus() method of a textbox that is in the lightbox to bring focus to the textbox right away. When in Firefox, the text box gains focus with no problem. In IE, the text box does not gain focus unless I ...

Printing from the web with few steps

I need to add functionality to my J2EE-based wep application: 1) Take some page, probably with form controls, convert it to some printer friendly format. 2) Print this rendered format a) without showing it and b) without a print dialog. I'm not too worried about 1, but have no idea if 2a and 2b are even possible. Thanks for any help. ...

Do you need a framework to write Ruby or Python code for the web?

Every time I see Ruby or Python discussed in the context of web development, it's always with a framework (Rails for Ruby, Django for Python). Are these frameworks necessary? If not, is there a reason why these languages are often used within a framework, while Perl and PHP are not? ...

Which JavaScript libraries will handle popout windows (i.e. like Meebo or Gmail chat windows)?

I could write this, but before I do, I wanted to check to see if there are existing solutions out there since it seems a lot of websites already do this, so I was wondering if there was a quick way to do this. Also, I am talking about "popout" windows, not "popup" windows. All JavaScript libraries support "popup" windows, but I want on...

Unified Navigation System for JSF (menus, breadcrumbs, sitemap)

We're using MyFaces, Richfaces & Restfaces to build a website on top of Oracle Stellant CMS. We're not using Site Studio. Are there any widgets/combination of widgets out there that could provide a unified navigation system? The site structure needs to be read from a DB table and CMS metadata fields, and we need a top tab menu, an expand...

Designing Web Sites with Ruby on Rails

I'm just learning Ruby on Rails. I've read a few books, I've watched lots of Railscasts, I've looked at some examples. However, when working on my first serious project with Rails, I've gotten hung up on how to properly implement some very basic web site features that most tutorials I've seen lack. For instance: Navigation menus. Lots...

What percentage of marketshare does a browser need for your support?

I'm building a website for a small non-profit org. and I was wondering at what kind of browser marketshare a browser should have before I support it. Chrome looks like a major contender, but it's still less than 5%, as is Opera. What browsers do you think I should completely support for this kind of project? ...

How do I properly handle the viewstate of a child control within a composite control?

I have a composite control that contains a ListBox child control. On postback, the items for the ListBox disappear. I have a property for the ListBox that initializes it, and I add it to the controls collection in CreateChildControls. Am I doing something wrong? Do I need to be doing something else to properly handle the viewstate of thi...

Building a full text search engine: where to start.

Hello. I want to write a web application using Google App Engine (so the reference language would be Python). My application needs a simple search engine, so the users would be able to find data specifying keywords. For example, if I have one table with those rows: 1 Office space 2 2001: A space odyssey 3 Brazil and the user qu...

Why should I both Unit test AND Web test (instead of just web test)?

My current position is this: if I thoroughly test my ASP.NET applications using web tests (in my case via the VS.NET'08 test tools and WatiN, maybe) with code coverage and a broad spectrum of data, I should have no need to write individual unit tests, because my code will be tested in conjunction with the UI through all layers. Code cov...

What are some of the major shifts in thinking required to become a good Rich Internet Application (RIA) developer?

I've been experimenting with Adobe Flex recently. Being a long-time server-side web app developer, I'm faced with difficulties that I last experienced when I dabbled in Java Swing development a long time ago. It mainly revolves around the flow of control between my code and the framework's code. Most things are asynchronous as to not fre...

Should web applications use explicit SQL transactions?

Consider a regular web application doing mostly form-based CRUD operations over SQL database. Should there be explicit transaction management in such web application? Or should it simply use autocommit mode? And if doing transactions, is "transaction per request" sufficient? ...

How to implement Querystring authentication

I’m developing a website of a client and they are sending out newsletters to their customers (through the website administration interface) The newsletters are personal to each of the subscribed recipients/customers. Each recipient/ customer is also a user with a username/password that enables them to sign in on the website and manage t...

Do you validate your URL variables?

When you're passing variables through your site using GET requests, do you validate (regular expressions, filters, etc.) them before you use them? Say you have the URL http://www.example.com/i=45&amp;p=custform. You know that "i" will always be an integer and "p" will always contain only letters and/or numbers. Is it worth the time to m...

Under an MVC framework, which directory structure would be expected by other developers?

Generally, MVC frameeworks have a structure that looks something like: /models /views /controllers /utils However, in a web application suite, I've decided that clumping all models, views, and controllers together probably wouldn't be the best for clarity, unless I treated the system as one application instead of an application suite....

Where should assets go in a code igniter project?

I'm just starting with CI, and am not sure where things such as css, js, images should go. Outside the whole system folder seems ok, but that means everything is seperate. Inside mean s the filepaths are longer and I'm worried that it might mess things up. What's the official line on this? ...

Advice on starting a business: getting clients

I'm currently working as a developer at a web development agency, but I've long aspired to run my own business. I disagree with present management, and feel I could do infinitely better. I've done many business-like things before - organized events, run a very large and successful website, some publishing. I've been saving up, and have ...