In this edition…
- About This Newsletter
- On the Blog => Access Control and Authentication in Yii
- On the Web => HTML Purifier
- Q&A => How do I go about learning Ajax?
- Q&A => PHP vs ASP.NET vs ???
- Q&A => Do you do any social networking?
- What is Larry Thinking? => Starting a New Business
- Book Giveaway => PHP for the Web: Visual QuickStart Guide and Translations
- Larry Ullman’s Book News => Flex
About This Newsletter
Not much to say as an introduction: it’s another newsletter, without a cohesive plan. Although it did cross my mind that I could come up with a more clever title than “Larry Ullman’s Newsletter” (or my blog, “Larry Ullman’s Blog”). My thanks to everyone for their nice words on these newsletters and please keep those comments and questions coming!
On the Blog => Access Control and Authentication in Yii
A couple of weeks back I completed a three-part series on authentication and authorization using the Yii framework. If you’re curious about this aspect of the framework, start with the first post on Simple Authentication. Also, it looks like the blog is on a restricted diet (fewer posts) while I continue working on my next book.
On the Web => HTML Purifier
Some time back I came across HTML Purifier. Written in PHP (it requires PHP 5), HTML Purifier is a standards-compliant HTML filter. It can be used to prevent Cross-Site Scripting attacks (XSS), improve the compliance of HTML entered by a user, and even convert deprecated tags into more-appropriate ones. To see it in action before installing it yourself, check out the online demo.
Q&A => How do I go about learning Ajax?
Q&A => PHP vs ASP.NET vs ???
I just recently received a question about choosing PHP over ASP.NET, or whether there’s a value in knowing both, or something else, for dynamic Web development. I’ve covered this before in my newsletters but it’s worth revisiting. I’m of the opinion that it’s best to be fairly strong with one thing than mediocre with several (I mean that with respect to competing technologies like PHP and ASP.NET, not companion technologies like PHP and MySQL). I’ve developed most of my Web applications using PHP, I’ve done a couple with ASP.NET, a couple with Ruby on Rails, and a few pages here and there using JavaServer Pages (JSP), so I have a fairly decent understanding of the available tools (I’ve never used ColdFusion, however).
The problem with ASP.NET, in my opinion, is that it only runs on Windows and can only be developed on Windows (this is more functionally true than actually true as there are ways to force ASP.NET onto other platforms). This is a show-stopper for me. But if you’re dedicated to only using Windows for development and for hosting, ASP.NET is pretty powerful and easy enough to learn. You’ll spend more money going this route, though: the serious tools, like Microsoft’s Visual Studio, are very expensive, as are add-ons you might want to use in a site. For example, one ASP.NET project I did required a forum. Instead of creating my own, I thought I’d use a standalone product that could be integrated (as I would do in a PHP site). The only available third-party products were all commercial; there was nothing freely available like Phorum or phpBB. Conversely, PHP can be run on most operating systems and there are tons of free add-ons available. Personally, I don’t see a justification to learn ASP.NET if you’re already doing PHP development. (And, if you’re curious, I learned ASP.NET because: A) I like learning new things; B) Microsoft had me up to their headquarters to show it to me; and, C) there were a couple of jobs that I wanted to do that required ASP.NET).
If you’re already primarily an ASP.NET developer (you’re probably not subscribed to this list but…) there may be a value in learning PHP so that you can develop on other platforms. But you’re likely to find PHP to be harder and more time consuming, as it’s not really comparable to ASP.NET. The latter is actually a framework, and C# or Visual Basic is used for the programming.
All that being said, the hardest part of Web development is understanding the theories and best practices. From there, switching from one technology to another is largely about syntax. So I’m not inclined to recommend learning multiple Web development technologies, but if you want to try, it’s not that hard as they’re functionally similar.
Q&A => Do you do any social networking?
I am occasionally asked if I use any of the social networking sites: Twitter, Facebook, MySpace, etc. I’m not personally inclined to do these kinds of things, although I understand there could be a marketing benefit to doing so (but, then again, marketing isn’t my strong suit). Twitter is out for me because I’m not a cell phone person, so the idea of sending and receiving updates through Twitter is beyond me (I know Twitter isn’t just for cell phones but…). I do own a cell phone, but only one person has the number, so that probably tells you what kind of mobile user I am, or am not. But really, with Twitter, the fact is that my life is extremely mundane, so the idea of tweeting updates like “Trying to get through another chapter” and “Have to hit the grocery store before picking up the kids” doesn’t make much sense. If I traveled more, or did anything that interesting, maybe I’d feel differently. Also, to be frank, I have this (arguably unreasonable) dislike for fashionable things, so every time I hear about Twitter, I’m that much less likely to use it myself!
Still I have been a member of LinkedIn, however, for a couple of years. I’m not terribly active with it and it largely strikes me as Facebook for professionals but if you want to connect with me there, you’re more than welcome.
What is Larry Thinking? => Starting a New Business
In my first newsletter, I address a subject that’s come up a lot, both with me and in the industry as a whole: creating new Web sites and businesses. One time in 2002, I was part of a team that tried to create a new venture and failed. In my opinion, it failed not because of a lack of a good idea or resources, but mismanagement. I certainly don’t regret being part of the venture–it cost me nothing but some time, and I made a lot of great connections, but it made me leery when I encounter others trying to make it big. Which I do a lot, as many who read my books have similarly large dreams. I don’t begrudge people their hopes and aspirations, of course, I just want to caution everyone against putting themselves too far out on a ledge because the statistics say that most ventures won’t succeed. It just troubles me greatly when I get people asking about spending thousands of dollars on a server when they haven’t created a line of code or even purchased a domain name.
My point in revisiting this topic is that the most brilliant writer Malcolm Gladwell in his “The Sure Thing” article published in the January 18, 2010 issue of “The New Yorker” talks about business success in an enlightening way (pretty much everything you read by Gladwell will enlighten you). A paragraph about new businesses really struck a chord with me. In it, Gladwell documents the certain qualities that successful new businesses clearly have. For example, the more initial capitalization (i.e., money), the better. Taking over an existing business is more likely to succeed. Selling to other businesses is easier than selling directly to consumers. And it’s better to go after missed consumers than those already being served. Most new businesses don’t do these things (not that they’re necessarily possible for all new businesses anyway), and they also undervalue marketing and finance. In short, many new businesses fail because they don’t have a full, working plan established. And my point, which I’ve said before, is that just having a good idea does not equal success. Adding X feature to a YouTube copy won’t make you rich (and, frankly, by the time you implement that new feature, one of the hundreds of smart people at YouTube will likely have thought of it and implemented it themselves).
Again, I’m not trying to dissuade anyone or rain on their parades, but if you’re asking me for business advice, which people often do, my suggestions are: plan way ahead, spend money wisely, and try to have realistic expectations.
Book Giveaway => PHP for the Web: Visual QuickStart Guide and Translations
I had a strong response to the PHP for the Web: Visual QuickStart Guide giveaway. My thanks to everyone for their interest and my apologies if you did not get picked to receive a book. I haven’t yet sent out the books (been working too much) but really hope to this Friday. All I have left to giveaway are some translations, so my next official giveaway will be the Effortless Flex 4 Development book later this Spring. (Please don’t ask now, or ahead of time, for a free copy.)
Larry Ullman’s Book News => Effortless Flex 4 Development
I’ve finished up the rough table of contents for my next book, tentatively titled Effortless Flex 4 Development (I forgot to add the “4” in the previous newsletter). My approach is this: when talking about Rich Internet Application’s (RIAs), a lot of focus is given to the User Interface(UI) because RIAs provide a user experience closer to what they come to expect from their desktop applications. However, I would argue that data is just as important. So the book does cover Flex 4 for those unfamiliar with it (whether new to Flex or just to Flex 4) but the meat of the book will be on using data. Specifically, I’ll be using PHP as the server-side agent, and a combination of data formats (JSON, XML, and AMFPHP). The data and PHP emphasis is one way in which the book will differ from existing ones; plus, PHP support is a promoted feature in Flex 4.
I’ve also written the first two chapters of the book, about 60 pages. Apparently I’ve forgotten how hard it is to write a book, or maybe I’m just rusty. I’ll continue to post updates on the book as it progresses.