Thursday, 27 September 2012

ASP: how to get a file extension


While we have already seen how to upload files and how to work with the Scripting.FileSystemObject, today we are going to see how to get a file extension, for example before authorising a user to upload a file to our server. We all know very well how important is security when working with the file system objects: for example, we don't want the user to upload executable, or other potentially malicious files on our server.
Said that, we can create a short ASP function to check the file extension, and grant or deny the upload.
Let's see how...

Tuesday, 25 September 2012

ASP: how to keep track of downloaded files


Today we are going to see how we can keep track of downloaded files in a web site.
We normally link files with an hyperlink. The trick in this case is to pass the file information to another ASP page and then - after "taking note" of the relevant information - initiate the download.
Ready to see the code? Follow me...

Thursday, 20 September 2012

SQL Server: SQL Server maintenance solution


Today we are going to see a wonderful set of utility, we might need to manage our SQL Server.
We are talking about SQL Server maintenance Solution.
"The SQL Server Maintenance Solution comprises scripts for running backups, integrity checks, and index and statistics maintenance on all editions of Microsoft SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, and SQL Server 2012. The solution is based on stored procedures, functions, the sqlcmd utility, and SQL Server Agent jobs. I designed the solution for the most mission-critical enterprise environments, and it is used in many organizations around the world. Numerous SQL Server community experts recommend the SQL Server Maintenance Solution, which has been a Gold and Silver winner in the 2011 and 2010 SQL Server Magazine Awards. The SQL Server Maintenance Solution is free."

Tuesday, 18 September 2012

jQuery: dNotify - A simple user notification plugin for jQuery


Today we are going to talk about dNotify, a simple user notification plugin for jQuery.
The way this simple plugin works is very interesting. Because I usually hate when popup message start to - well - pop up all over the web site, I've found dNotify quite unobtrusive. Moreover, we should consider the use of dNotify in web applications, where we do need to interact with the user more than in other situations.
What makes the plugin almost unique is the fact we can control everything about the notification.
Let's see how we can use it.

Thursday, 13 September 2012

IIS: customised error messages


Hey everybody! Today we are going to work on IIS, and give those boring error messages a new look.
Customising error pages is an underestimated thing by most web developer. However, as you may understand, it can really make our web site different, and - for example - prevent visitors from going away.
In order to customise the error pages we need to use IIS Manager on the web server. If you're not the server administrator, you can always ask for help. If your web site is hosted somewhere by some web hosting company, well... check if you've access to such configuration from your web site control panel (if you've such a tool) or ask the company directly.
Now... let's see how to customise error messages.

Tuesday, 11 September 2012

CSS: a shadow on just one side of a box


The following trick is quite interesting: we are going to create a box shadow only on one side of a box with CSS.
Just to be clear, something like:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

I just added a white background to make it more clear...
Do you like it? Let's see how to do it.

Thursday, 6 September 2012

CSS: Firefox 16 and prefixes


I don't know if you are using Firefox or not, but the following information are quite important to any web developer.
We are talking about some CSS3 properties which are now supported by Firefox with prefixes.

I've already showed a way of removing those annoying prefixes from our code in a specific article, however it seems that the new version of Firefox (the 16th) will get rid of some of them.

According to Paul Rouget (who work at Mozilla) there's an unprefixing work in progress for Firefox 16. Specifically they are going to remove prefixes for:
- CSS3 Animations
- CSS3 Transitions
- CSS3 Transforms
- CSS3 Gradients
- IndexedDB
and probably for calc() as well.

What's in for us, web developer? A possible nightmare if we have been not very careful.
In fact in the near future, the unprefixed properties will be the only one supported by the browser. It means that we are facing a potential complete review of our CSS code. If we forgot to use unprefixed properties, the prefixed ones will not work. And the nightmare is not finished: what about users who don't update their browsers?
We need to consider all possible situation. If in the past we had to use prefixes for Mozilla and for Webkit, now we have to be sure the unprefixed property is there as well.

I'm sure that if you're reading The web thought, you already know how important is to plan your code. And if so, you have already taken into account the possibility of unprefixed properties.
If not, well it's better to start worrying and to start planning a review of your CSS code.

Tuesday, 4 September 2012

The web thought


The following graph represent the growth of hits for The web thought. I know it's not very reliable (it's taken from Blogger statistics) but it visualises how things have changed lately.
Obviously a big thank to all of you!

My new job is keeping me away from the blog lately and I still find difficult to find time to dedicate to new posts. I will try to put my best efforts in keeping The web thought updated with new articles... so stay tuned!