|
|
|
Related Articles
|
|
|
|
| |
Tony van Kralingen, the MD of South African Breweries, answers readers’ questions. How were beer sales last weekend? Great! Especially Castle Lager, through our “Back the Boks” campaign. What an incredible time for all South Africans. Given the tough trading conditions in the US beer market, do you regret buying Miller? The Miller transaction gave the group an attractive position in the world’s most profitable beer market, at the same time providing important currency diversification in earnings. While the competitive environment has been tougher than anticipated, the spread of SABMiller’s operations and its US operation has been of significant benefit in the subsequent expansion of the business around the world. SAB’s Drink Responsibly campaign cleverly encourages drinking while making the consumer responsible for the consequences. What plans do you have to cut violence and excessive drinking during the 2010 World Cup ? SAB’s efforts to educate consumers go some way beyond advertising campaigns and extend to partnerships with government and extensive internal training. The campaign is designed to encourage South Africans to consume our products in a responsible way and not to abuse them. We test the effectiveness of our campaigns thoroughly and consistently and they have shown to be very successful in helping to change mindsets. However, the reduction of alcohol abuse requires both education and consistent enforcement and with respect to 2010, enforcement would be the responsibility of the relevant law enforcement authorities, together with ongoing educational efforts by us and the Association for Responsible Alcohol Use (ARA). Interestingly, South Africa is not actually a nation of heavy drinkers, although binge drinking can be a problem. We are 25th in terms of annual beer consumption (56 litres a person a year) , some way behind the Czech Republic at 157, Germany at 117.5 and the UK at 101.5. As far as alcohol is concerned, we are 37th at 4.6 litres, behind Luxembourg at 12.6 and the Czech Republic at 11. Will rival sponsorship in 2010 cost you market share in SA and elsewhere? No, we don’t expect the Fifa World Cup to have any impact on our market positions outside South Africa. At home, beer is mostly consumed in restaurants, bars, taverns and clubs — not at the stadium. We are very proud of our brands and our beers and we’re confident that South Africans will take the opportunity to show all visitors everything good that our country has to offer — and that would include South African brands, especially Castle Lager. How will new ideas and plans, such as the those to produce ethanol, affect the price of beer? Beer pricing is affected by commodity prices relating to the main ingredients — barley, hops and maize. Packaging is also part of the price. However, beer in SA remains one of the cheapest (before excise and tax) in the world. You have a formidable social responsibility plan, will this be reduced to retain market share? No, we have no plans to reduce our corporate social investment spend. In fact, we increase our spend each year and we’re enormously proud of the difference we make through our flagship projects. SAB KickStart has equipped more than 22500 young adults with business skills and provided many of them with seed capital to set up their own businesses. Since 1995, SAB has invested more than R38.5-million in this project and helped launch over 3200 businesses. Today, 30percent of SAB’s KickStarters are suppliers to SAB and since 2004, 86percent of grant winners are still in business today. In terms of financial impact, as at 2007, 83.3percent of SAB KickStarters reported that their businesses were growing. Turnovers with KickStart businesses increased an average of 375 percent since inception. Their average combined turnover amounted to R109,2-million and 816 full-time jobs have been created. We have also invested well over R3-billion in our owner-driver programme since inception. Today, owner drivers account for over 60percent of all SAB’s deliveries. As a result, this R300-million a year project has created 235 independent, sustainable businesses. Each truck owned by an owner driver is worth about R800000 and if drivers manage their businesses properly, each could become an asset millionaire within 10 years. Our taverner training programme, Mahlasedi, teaches business skills and socially responsible liquor retailing to a growing number of licensed outlets and has enjoyed significant success. Over the project’s history to April 2007, 12400 taverners had been trained by SAB and we have committed R100-million to this project over five years, aimed at training 30000 taverners in total. Will you publicly disclose the support you will provide to political parties in the coming election? We have made donations to national elections in the past according the degree of representation by each political party. This decision was made to help ensure good political process in a new democracy. All donations are disclosed. SAB was one of the signatories to the Energy Efficiency Accord. Have you honoured this commitment? The voluntary energy efficiency accord is an agreement between industry and the Department of Minerals and Energy to work together in pursuit of the national energy efficiency targets on a voluntary basis, recognising that energy usage is a major contributor to greenhouse gas emissions in SA. The target reduction is 15percent by 2015. We are on track to deliver on our commitment through specific technical and operational improvement projects at the breweries and soft drink plants. We are also proud of our many environmental achievements. Our water usage is among the lowest in the world and still improving. Over 80percent of all our volumes are sold in returnable bottles and we work closely with can and glass manufacturers to ensure consistent recycling. |
| |
|
| |
| |
One of the new controls in ASP.NET 3.5 that I think will be very popular is the <asp:ListView> control. The ListView control supports the data editing, insertion, deleting, paging and sorting semantics of higher-level controls like the GridView. But - unlike the GridView - it provides you with complete control over the html markup generated. The ListView control, when combined with the new Web Designer and rich CSS support in VS 2008, enables you to build much cleaner HTML UI. Over the next few weeks I'll be putting together several blog posts that show off how you can use it. Building a Products Catalog Page For today's blog post we are going to start simple and just build a basic product catalog listing page like below: This products.aspx page will take a Catalog index in the URL, and use LINQ to SQL to retrieve and display product information. We will also enable paging navigation at the bottom of the product listing (and do all of the paging operations in the database - so that only 6 products at a time are retrieved from the database). The HTML markup output from the server will be 100% CSS based (no tables or inline styles). Step 1: Defining out Site Layout with Nested Master Pages Before we start working on our product page, we'll first want to define the overall UI and layout structure for our site. If you are "design challenged" like me, one approach you might want to take with a new site is to get started by using one of the free HTML site templates that you can download from these two sites: http://www.opensourcetemplates.org/ or http://www.oswd.org/. The templates on these sites are pure HTML (meaning you can use them with any server-side programming technology), and are built using clean CSS and XHTML markup. For this blog post I decided to go with the "TerraFirma" template here. After I downloaded the template, the first thing I did was to create a root "Site.Master" Master Page that defined the overall layout structure for the site. I then created a few nested master pages to define different column style layouts ("SingleColumn.master" and "TwoColumn.master"). VS 2008 now has great support for creating and using nested master pages that makes doing this easy. You can read about how to define and use them in my earlier VS 2008 Nested Master Page Support blog post. Once we have created our master pages layouts, we can then create a new product catalog page for the site that is based on the single-column nested master page (click below for a full screen picture): Notice above how we can edit the page using the new VS 2008 Split View mode feature. Above I'm using the "Vertical Split View" option so that I can see both the source and design view on a wide-screen monitor. You can learn how to enable this in my earlier Enabling Vertical Split View in VS 2008 blog post. Step 2: Defining our CSS Rules using Mock HTML UI When it comes to defining our product UI for the page, there are a couple of different approaches we can use. One would be to start by writing code to generate some dynamic data UI, and then work to make it pretty. Another approach we could take would be to start by mocking up the HTML UI first, and then once we are happy with it write the code to make it dynamic. For this blog post I'm going to take this second approach. To start let's just add a standard <ul><li> list of product content into the page: As you can see above, this <ul> list looks pretty unattractive, and obviously not like what we want our product listing page to look like. To make it more attractive, we'll use some of the new CSS editing features I covered in my earlier VS 2008 Web Designer and CSS Support blog post. Specifically we'll want to open the new "Manage Styles" tool window in VS 2008 (you can open this by selecting the Format->CSS Styles->Managed Styles menu item): The manage styles window provides an easy way for us to see all CSS rules currently in our CSS stylesheet. It also enables us to quickly lookup CSS selector values, refactor css rules across stylesheets, and create new rules. We can create a new CSS rule for our product listing by selecting the "New Style..." link in the "Manage Styles" window. This will bring up a dialog that enables us to choose where we want to define the CSS rule, and configure what settings we want for it. For this sample we'll name the CSS selector ".productslist li" and select the "Define in existing style sheet" option to add it to the external stylesheet we already have for our application: We can then hit "ok", and return back to source mode to assign the CSS rule on our <ul> list (note how VS 2008 now provides CSS intellisense in source view): Currently our CSS rule doesn't have settings assigned to it, so our <ul> list will still look the same as it did before. We can change that by assigning some CSS settings. There are a couple of ways we could set these CSS settings: 1) open up the CSS stylesheet and set them in source mode, 2) use the manage styles dialog we saw before to set them, or 3) use the new CSS Properties Window to edit the CSS rules in real-time within the designer. We can bring up the CSS Properties Windows via the View->CSS Properties menu: When you select an element either in source-view or design-view, the CSS Properties Windows will list all of the CSS rules that apply to it. The "Applied Rules" list at the top of the CSS Properties window indicates the precedence order of cascading rules. The CSS properties list below it then shows all of the setting values assigned to that element. The "target rule" drop down in the style application toolbar (circled in red above) indicates which CSS selector a change in the CSS Properties window will be assigned to. In the example above our .productlist li rule is the CSS selector we currently have selected - which means as we set values in the CSS Properties window they will be persisted under that rule name in our external CSS stylesheet. No style settings will be persisted inline the HTML page. Let's now make some changes to our "productlist li" CSS rule. First we'll change the layout display mode to be "inline": We'll then want to float each <li> to the left: And lastly we'll set the bottom and left margin of each <li> element to be 15px to space out the products nicely: Notice how when we are done no inline styles have been saved in our HTML page: Instead they've all been cleanly saved under our "productlist li" CSS selector in the external CSS stylesheet: Now all that remains is for us to replace the static HTML with some dynamic data coming from a database. Step 3: Defining our LINQ to SQL Data Model We'll use LINQ to SQL to retrieve our product data from the database. LINQ to SQL is a great new ORM (object relational mapper) implementation built into .NET 3.5. You can learn more about it from my on-going LINQ to SQL blog series (more posts in it coming soon): Part 1: Introduction to LINQ to SQL Part 2: Defining our Data Model Classes Part 3: Querying our Database Part 4: Updating our Database Part 5: Binding UI using the ASP:LinqDataSource Control We'll use the Northwind sample database for our product data, and define our data model classes in the LINQ to SQL ORM designer like so: Once we have our LINQ to SQL data model defined, we are ready to use the <asp:listview> control and bind the data to it. Step 4: Convert our HTML Mock UI to use the <asp:ListView> control The <asp:listview> control is a template-driven control. The control itself outputs no "built-in" UI, nor any actual HTML markup. Instead, you can define whatever markup *you* want displayed using the below templates: LayoutTemplate ItemTemplate AlternatingItemTemplate SelectedItemTemplate EditItemTemplate InsertItemTemplate EmptyItemTemplate EmptyDataTemplate ItemSeparatorTemplate GroupTemplate GroupSeparatorTemplate The first two templates in the list above - LayoutTemplate and ItemTemplate - are the most common ones you'll end up using. The <LayoutTemplate> template allows you to define the outer container/wrapper of your data UI. The <ItemTemplate> template then allows you to define what each item in the list should look like. Within the <LayoutTemplate> you then define an "ItemContainer" control that indicates where you want the <asp:ListView> control to dynamically add the <ItemTemplate> items into the output markup. To see how this works in action, we could take our mock products HTML UI: And replace it with a <asp:listview> that can dynamically generate the exact same markup output like so: Notice above how I am using a <asp:placeholder> control in the <LayoutTemplate> to indicate where I want to add in my items in the list. I could use other controls instead as the itemContainer if I wanted to - but by using an <asp:placeholder> control as the itemContainer I will prevent any id values or extra markup being generated. Notice above how I've also defined an <EmptyDataTemplate>. This will display instead of the <LayoutTemplate> if I assign an empty sequence of data to the ListView. This will avoid us inadvertently displaying an empty <ul></ul> element in the event that there are no products in the catalog specified. Once we've defined our template above, we can write some code in our code-behind file to retrieve our product data using LINQ to SQL, and bind our ListView with it: VB: C#: And now when we run the page and supply a valid categoryid as a querystring argument we'll see our products dynamically pulled from the database: If we try a category that doesn't contain products, we'll get our empty template message: If you do a "view source" on the products page in the browser, you'll see that the markup generated from our ListView control is the same as what our static HTML was: There are no ID elements or inline styles generated. We had complete control over every HTML element and attribute generated. Step 5: Using a <asp:LinqDataSource> control instead of writing code In our previous step above we wrote procedural LINQ to SQL code to databind our <asp:ListView>. This obviously works, and provides a great deal of control over the logic executed. Another option you can alternatively use is a declarative ASP.NET datasource control. All of the ASP.NET 2.0 datasource controls (SqlDataSource, ObjectDataSource, AccessDataSource, XmlDataSource, SiteMapDataSource, etc) work with the ListView. You can also use the new <asp:LinqDataSource> control with it. For more information on the LinqDataSource, check out my previous LINQ to SQL Part 5: Binding UI using the ASP:LinqDataSource Control blog post. To use the <asp:LinqDataSource> in the above sample, we'll first delete the previous code we wrote in the code-behind file, and then click on the <asp:ListView> control in the designer and select the "Choose Data Source->New DataSource" option. We'll pick the "LINQ DataSource" option in the data source dialog, and then bind to the Northwind data model we created earlier. We can then choose to bind the ListView against the "Products" entity collection in our Northwind data model: We can then hit the "Where" button to configure a LINQ filter based on the "category" value in the querystring (we could alternatively bind the value from a form value, cookie, session value, another control, etc): When we press the "ok" button the ListView's DataSourceID will be set to a new <asp:LinqDataSource> in the page: And now without us having to have any code in the application we have a product listing with custom HTML UI databinding against our LINQ to SQL data model. Step 6: Enabling Server Side Paging using the <asp:DataPager> control Our last step with this sample will be to enable paging support over the products data. Specifically, we only want to display 6 products at a time on the page, and provide a nice page number UI to allow users to navigate forward and backwards over our product sequence. One of the other new controls in ASP.NET 3.5 is the <asp:DataPager> control - which makes data paging scenarios with the ListView control pretty easy. You can drop it anywhere you want on a page, and set its "PagedControlID" property to point at the ListView, and its "PageSize" property to indicate how many items in the ListView you want displayed at a time: The <asp:DataPager> will then output navigation UI for your ListView: And then if you click the "2" link in the paging UI above it will show you the remaining 5 products in the category: The <asp:LinqDataSource> automatically uses LINQ to SQL's built-in support for server-side data paging to ensure that only 6 products (because the PageSize is 6) are ever retrieved from the database at a time. This means that your application and database will scale even if you have thousands of products in a specific category. Disclaimer: The <asp:DataPager> in Beta2, though, does have some limitations in that it can't by default be driven off of a querystring value - which makes it not very SEO friendly. I'll cover how to fix this and support a querystring index in a future blog post. Summary Hopefully the above walkthrough provides a good first look overview of how to use the new <asp:ListView> control. You will find that this control provides you with complete control over the markup output sent down to a client - while still providing rich data paging, editing, deleting and insertion semantics. I'll cover many more of these scenarios (along with the ListView's cool grouping functionality) in future blog posts. Click here to download a copy of the above sample in order to try it out on your own machine. Hope this helps - and have a great weekend! Scott |
| |
|
| |
| |
(InfoWorld) - David Heinemeier Hansson is the creator of one of the hottest technologies amongst software developers these days: the Ruby on Rails Web framework. Hailing from Denmark, Hansson is a partner at 37signals, a Chicago firm that develops tools for communications and collaboration. InfoWorld Editor at Large Paul Krill met with Hansson during the RailsConf 2007 event in Portland, Ore., last week, where Hansson expressed pride in how the community has latched onto Ruby on Rails. Development of Ruby on Rails 2.0, featuring REST (Representational State Transfer) is in progress. Hansson stressed Rails's emphasis on convention over configuration, suggested Microsoft is having battles internally regarding open source, and expressed doubts about whether Microsoft can win converts its new Silverlight technology.
InfoWorld: When did you develop Ruby on Rails and why?
Hansson: I started developing Ruby on Rails actually as part of the first Ruby project I did, which was Basecamp. The summer of 2003 was when I originally got into Ruby, and I had been doing PHP and some Java for about four or five years ahead of that. But I was getting fed up and tired with those environments and wanted to give something new a chance, so I stumbled over Ruby and started playing around with it. And within about a week of playing around with it, I knew there was no way I could go back to either PHP or Java or anything else I'd been doing before.
InfoWorld: Why is that?
Hansson: Ruby just felt like such a great fit for my mind. So many things that I was frustrated about in previous environments I'd worked with just seemed to be solved incredibly beautifully in Ruby. And that was really one of the first things that I noticed that I intensely liked about Ruby, it was the aesthetics of the language. Ruby code is just inherently beautiful. Sure, you can write ugly code, but you can write incredibly beautiful code too.
InfoWorld: How did Rails come about?
Hansson: It started out not wanting to be Rails. It started out just me wanting to implement Basecamp, this Web application for 37signals. And I started working on that, and Ruby at that time had some Web frameworks, but [they] weren't necessarily what I directly liked. I came into Ruby with a lot of preconceptions of what Web applications should be like and how they should be developed from all the work I'd been doing in PHP and Java. And I wanted to bring some of those ideas in. So I started working on a little bit to talk to the database, a little bit to run some templating language to get something in HTML displayed. And all of those small pieces started just getting built up more and more. And a few months into it, I realized that I now had a fairly sizable chunk of tooling that I'd built just for myself just to implement Basecamp in Ruby. Maybe I could actually share that. So around December 2003, I kind of got into the mode that, hey, I want to release this. I want to wrap this stuff up, these tools I'm doing, put it into a box and let others enjoy themselves with it. Because I was thinking, Ruby is kind of a hidden gem right now. And it's really a shame. There are so many Web developments out right now that are, in my mind, stuck in PHP or Java, which is what I was thinking about at the time. And if I could have so much fun as I was having with Ruby right now, it'd be a travesty if I just kept all that to myself. So around December of 2003, I made the decision to really make a framework out of it, but it wasn't until six months later that Rails was actually released for the first time. We released it I think June 24 of 2004, the release of Rails 0.5.
InfoWorld: This is another weekend Ruby Conference. Why are developers so excited about Ruby and Ruby on Rails? You kind of elaborated on that a bit before.
Hansson: Sure. I think a lot of developers are excited about Ruby on Rails because it allows them to focus and think about something as simple as the joy of programming. That's not just a side effect of working on real enterprise production systems, it's at the forefront of development [of] Ruby on Rails. We really want developers to be happy about the programs they're working on, the tools that they're working with, and the environment they're living in as programmers. And I think that [we are] explicitly choosing to make that the center of development of how we go about developing Rails, making sure that the aesthetics are just right. It's not the traditional computer science attributes we're trying to optimize for like memory usage or performance. We naturally care about those things because if it's not fast enough, it's not going to make us happy. But primarily, we care about getting beautiful code and getting a development environment where people are just happy about their work. And there are plenty of things in most traditional development environment that make people miserable. We tried to find those pain spots and remove them.
InfoWorld: Could you just name a couple of them?
Hansson: One of the things, for example, is how you configure your applications. A lot of environments, especially before Rails came around, had a notion that you basically started with a blank sheet of paper every single time. Everything had to be configured from scratch. How do I talk to the database? How do I map these fields between objects and records and rows and so on and so forth? You had to configure that explicitly every time, even though you might be doing the same thing over and over and over again. Like Groundhog Day, everything just started over and over and over again. So with Rails, we decided it's not going to be Groundhog Day. We're going to make some decisions and we're going to make them once. And once we've made those decisions, we're going to turn them into conventions, and we're going to teach you those conventions. And once you've learned them, it's done. Like we're no longer going to talk about what the primary key field in database tables are going to be called. They're going to be called ID, that's it. Now, [it's] done. Let's move on to the next decision. And like that we progressed through a ton of standard configuration points and literally removed them. We replaced them with conventions that said if you're just doing what most developers are doing the same [way] most of the time, you're going to get it for free. So they're going to be called ID. You don't care about that anyway. You shouldn't be caring about what the primary key fields are called, and if you can lift yourself above that and not care about it, you can get all this configuration stuff for free. So I think that's probably the biggest contribution we've made to thinking about frameworks. How can we get less configuration? How can we replace it with conventions instead? And how can we get a lot of productivity out of that?
InfoWorld: How does Ruby on Rails compare to Java framework like Spring?
Hansson: I think one of the big differentiators is definitely that notion of convention over configuration. Java frameworks in particular have been peculiarly fond of XML for wiring pretty much everything together, and in some sense, it sounds great. You get ultimate flexibility, you get the opportunity to wire everything together exactly like you want it, but most people don't really care. That amount of flexibility is not worth the tradeoff. And I think that's the fallacy of a lot of frameworks, especially in Java, they thought flexibility was free. Flexibility is not free. It's overrated. And if you trade that flexibility in for some constraints, you get a lot of complexity removed from the equation, you get a lot of productivity back from all the stuff you don't have to do. So that's one of the reasons that Rails is different from something like Spring or Struts and so on. Another thing is just the aspects of something like Ruby. The Ruby programming language is just an amazing programming language to be able to work with, and we choose to employ it across the stack. So everything is written in Ruby. We write the views in Ruby, we write the models in Ruby, we write the controllers in Ruby. We try to keep everything as Ruby as we can instead of mixing something up with XML this or configuration files that.
InfoWorld: Could you name a couple of the major Web applications or Web sites that have been developed with Ruby on Rails?
Hansson: Sure. So my own company, 37signals, has been kind of the poster child for some time, it's the original, the first Rails applications. We have something called Basecamp, a project collaboration tool. We have something called Highrise, just managing context online. But there's a ton of other companies out there too. I especially like 43things.com, which is like a social networking site about the goals you want to achieve in life. There's shopify.com, which is a really cool e-commerce marketplace where you can create a beautiful-looking shop in very little effort at all and start selling merchandise for very little up-front cost.
InfoWorld: Are you following any of the Ruby and Ruby on Rails tools that are being released, such as Ruby In Steel from SapphireSteel, CodeGear's upcoming Ruby offering, and the FiveRuns's Management Suite for Rails?
Hansson: I am. And I'm very pleased to see all that work going on. One of the things that I've wanted from day one for Ruby on Rails was to create an economic ecosystem around it because I think that's one of the factors that make sure that something like a framework like Rails will stick around. When people start depending on this for their jobs, when people start depending on this for their paycheck, it'll ensure a long life for the framework. And that happened early on with consultants who shifted to making Ruby on Rails projects instead of whatever they were using before, and now it's happening in second tier. People were building up businesses around selling tools to Rails developers, and I think that's just -- it's such an important point in the evolution of the ecosystem and a great milestone for Ruby on Rails.
InfoWorld: What do you think of Sun Microsystems' recently announced JavaFX Script for content creation? Is the world ready for yet another scripting language?
Hansson: I think there's always room for new ideas, but I don't think that the whole fuss that's currently going on about RIA, rich Internet applications, is justified. I think we've been through this cycle so many times before that it in some ways amazes me how history seems to be ignored. We went through this with Java applets, they were going to rule the Web. Everything was going to be in a Java applet. HTML and CSS is history. And Flash came around, and Flash started focusing on applications. Now Flash is going to rule the Web and HTML and so on is yesterday. Now, Silverlight, Apollo, JavaFX, they're all bidding to take over the JavaScript, HTML and CSS [spaces], and I just don't buy it. I don't buy that developers by and large are going to jump into a proprietary technology and replace what HTML and CSS has given them.
InfoWorld: I think Sun is saying JavaFX is open source. I'm not sure if JavaFX Script is focused exclusively on Web development. I think it's just one function that can be done with it, and I'm not even sure if it does it that well at this point.
Hansson: That might be true, and I think that HTML and CSS [are] focused on Web development. And I think that there are misconceptions going on from people who are pushing these alternative delivery platforms that somehow Web developers are hungry for richer and richer experiences, that they're really unhappy working with HTML and CSS. And that's just not true. We're not clamoring to re-create the desktop on the Web.
InfoWorld: We don't need a new mousetrap?
Hansson: No, we don't. HTML and CSS is actually a wonderful development environment, and a good number of computer scientists or people who have been around for a long time might consider them hacks or dirty or whatever, but they work.
InfoWorld: But you do use those on Ruby on Rails?
Hansson: Totally. HTML, CSS, and JavaScript are the key components of how you get Rails applications to a user. And I don't see that changing.
InfoWorld: But not Ruby?
Hansson: Ruby generates those things, so HTML, CSS, and JavaScript are delivery mechanisms.
InfoWorld: Do you think Java is being displaced by scripting languages like Ruby or some of the others that are out there?
Hansson: I think Java and C# and other languages of that type [are] definitely being replaced by leaner and lighter approaches. I think Ruby and Python and SmallTalk and other languages in that sphere [are] gaining rapid ground just by people realizing that they would much rather have an enjoyable, productive environment [rather than] buy into these arguments for safety or bad things that will come down if you don't have types and so on and so forth. So I'm absolutely seeing the market share of these languages going down as more and more people just realize that they didn't die by using [the] scripting languages.
InfoWorld: What do you think of .Net and Windows development and Microsoft enabling its Common Language Runtime to run on the Macintosh platform?
Hansson: In some ways I don't really care. I don't follow it very closely. The Microsoft ecosystem is not that interesting to me. It's a very different world from the world that I inhabit, which is one of open standards, open source, and so on and so forth. It's not to say that they don't do interesting stuff. I definitely do think that they have some interesting thoughts, [such as] LINQ (Language Integrated Query), which is very interesting. There's definitely a good number of things that the open-source world could learn from some of those initiatives, but wholesale jumping into the Microsoft boat has just never appealed to the kind of work I do.
InfoWorld: Can Microsoft succeed with Silverlight, or are AJAX and Flash the major players for rich Internet application development as it relates to multimedia?
Hansson: I think Microsoft can succeed selling Silverlight to people who already use Microsoft. If you're already using ASP.Net and other Microsoft techniques, that really in lot of ways were trying just to re-create the desktop online, then I totally think that these people will jump all over Silverlight. I do not think that people currently working in open source and with open standards like HTML, CSS, and JavaScript are going to fall off their chairs in pursuit of adopting Silverlight.
InfoWorld: Why not?
Hansson: I think that we don't need that additional complexity, we don't need that "richer experience." It's being sold as it's just universally something better than what we have with HTML and CSS and JavaScript. And I think a lot of the success of the Web has been in the constraints that those standards gave us. A lot of the success of the Web came with the standardization of just having a few tools that you really have to be clever about how to use in an effective way. You didn't have all the opportunities of the world, so you could create one crazy use interface after another. And I think that's often what "rich" means. It means wild or out there or fun. And that's totally fine -- if you're creating a game, then something like Flash is awesome. If you're creating yet another information application, which is the bulk of applications out there, then I think HMTL, CSS, and JavaScript [do] just fine.
InfoWorld: Microsoft is adding support for IronRuby and IronPython to the DLR (Dynamic Language Runtime). What's your take on that?
Hansson: I enjoy the fact that more people can get to experience Ruby by getting it in the side door somehow, that Ruby can be used in shops [that are] predominantly Microsoft shops. But I hope that those are more planting seeds for people to then get out. I'm not seeing that Ruby on the DLR or whatever is going to convince a lot of people currently using Ruby to jump in the arms of Microsoft. But I do see it the other way around. I do see people who were traditionally using Microsoft technologies being exposed to languages like Python and Ruby and then realizing that hey, maybe I actually don't need the Microsoft part.
InfoWorld: So then it can have an opposite effect. Do you think Microsoft is just blowing smoke with its threats against Linux that they talked about this week regarding alleged [patent] violations or is there something to it?
Hansson: I think they're doing the techniques that they've used successfully in the past. I think FUD'ing people up and making them insecure -- is Linux going to be sued out of existence? Am I wrong to base my entire infrastructure on open source? Creating all that fear, doubt and uncertainty is what Microsoft does really well. And that's, of course, seeing something like this, it's got to be so frustrating to people, the good forces within Microsoft who do understand open source and do want to get developers who are sympathetic to the open-source movement to get involved with their technologies. How persuasive an argument is it going to be now that Silverlight is this open platform and you can come play, and by the way we're suing everything else you build your business on? It's not going to be very persuasive. And I think it really sends so many mixed messages, and it seems like there's a war going on inside Microsoft. Like [Microsoft CEO Steve] Ballmer on one side pushing this FUD line against Linux and other open-source and open standards, and then you have somebody like [Microsoft Chief Software Architect] Ray Ozzie, who seems to be more with the times in getting that Microsoft can't invent its own universe forever and just ask people to come over. So I do hope that the Ray Ozzie side of a more open approach, a more inclusive strategy, is going to work.
InfoWorld: What's your take on JRuby, which runs the Ruby language on the Java Virtual Machine, and how does that tie into Ruby on Rails?
Hansson: I think it's fascinating. I have to be honest. One year ago I didn't have a whole lot of faith in the JRuby project, and that's mostly just from the experience of seeing other languages being re-implemented on other platforms. It seems mostly to have been curiosities. But I've got to say I'm hugely impressed about the work that the JRuby team has been doing, how fast they've been progressing, how fast they're catching up both in features and in speed. And as it stands right now, where they're actually able to run a good number of Ruby on Rails applications, it's marvelous. I think it opens a whole new avenue for Ruby into enterprise strongholds that would otherwise not [have] considered Ruby and Rails because that they didn't run on their existing infrastructure. So I think it's awesome, and I am really looking forward to seeing more about it. I still have some concerns or skepticism about -- is this really going to be something that appeals to regular long-term Ruby users? Would I run JRuby in a year from now? I am certainly not convinced of that fact. But I am certainly open to them coming up with something great, if they can turn JRuby into being say five, 10 times faster than the C-based Ruby, hey, who am I to say what we're going to run two or three years from now?
InfoWorld: Ruby on Rails is an open-source Web framework, as in you don't sell it. Are you making money from the project just the same through consulting? How do you monetize it?
Hansson: In a lot of ways I don't need to monetize it, I have a job. I work at 37signals, and we make money selling products. But we still in a large sense make money off it primarily through saving money. So we get to collaborate with a lot of other people around the world that then they'll pick up part of the work we would otherwise have to do. So that's the great thing about open source. You get to collaborate, and you get to share contributions and swap. So there's a lot of bartering going on that saves us a ton of development time. But there are also direct influences [in that] we get now a talent pool who know exactly the kind of technology we're working on, so it's much easier for us to hire new people. We've gotten a great amount of press out of it.
InfoWorld: What exactly does 37signals do?
Hansson: 37signals is a producer of collaboration and communication tools online. We use Ruby on Rails for everything. We have six products now. Three of them are paid products, the others are free products. They're all developed with Ruby on Rails.
InfoWorld: Any other points you wanted to raise?
Hansson: I think now that we're here at RailsConf, I'm really just immensely impressed about how far we've gotten in such a short period of time. Rails really took about a year to get going. The first year it was only über geeks getting involved and getting excited about it. The first book didn't come out until a year after. And so the first book is even just two years old. Today we have more than 20 titles, I believe, and we have a conference with 1,600 people showing up. It's fantastic to me to see the kind of impact that a grassroots initiative can have on the software industry in general. And that's not just my contributions, it's the contributions of everybody who's been involved with the Ruby on Rails project. There are so many people who have contributed to it, so many people who have evangelized it. |
| |
|
| |
| |
(InfoWorld) - Software that could be used to turn a Web browser into an unwitting hacker's tool has been posted to the Interne, after it was downloaded by a quick-thinking attendee at last month's Shmoocon hacker conference.
The software, called Jikto, was written by Billy Hoffman, lead researcher at Spy Dynamics. Hoffman demonstrated the code on March 24 as part of a presentation on the dangers of JavaScript malware.
Hoffman had discovered a way to write a Web vulnerability scanner in JavaScript, a Web language that can run in any browser. This technique circumvents JavaScript's security restrictions and, concerned that his Jikto code could be misused, Hoffman says he took extra steps to prevent the code from getting out.
However, in order for his demonstration to work, he had to post the Jikto code somewhere on the Internet. "Very briefly you could see the original URL of where the Jikto code got fetched," Hoffman said.
That was enough for show attendee Mike Schroll to snag a copy.
"I was sitting pretty close to the front and had my laptop out already," said Schroll, an information security consultant with Security Management Partners. "The second I saw it, I just started typing away."
Schroll posted the code to his Web site March 25 and submitted a link to the code on Digg.com. He removed the software several hours later at Hoffman's request.
Schroll said he posted the code because he thought it would be useful to other security professionals looking for ways to illustrate just how dangerous a scripting attack can be. "I was pretty interested in it because we do some engagements with clients where we do fake phishing sites," he said. "I wasn't trying to be nefarious or malicious."
The software was downloaded from his Web site about 100 times, Schroll said.
Over the past weekend, the code surfaced again, this time on the Sla.ckers.org online discussion forum.
With Jikto now public, security researchers worry it could be misused by criminals to scan internal networks for sensitive information or to build a malicious botnet code. "This particular tool is designed to take control of the Web browser," said Jeremiah Grossman, chief technology officer with WhiteHat Security. "It will crawl other Web sites and scan them, looking for vulnerabilities."
Hoffman was sanguine about the release of his tool, saying that criminals would probably have been able to develop something similar to his short, 800-line application.
"It's kind of a tragedy that this ended up getting released," Hoffman said. "But in reality, the bad guys probably knew this, and even if they didn't have it, they were probably a couple of months away."
He said he's not angry at Schroll for snagging and releasing the Jikto code. "He probably did what any curious individual would have done," he said. "I really can't fault someone for being curious because that's what my job is."
This story was updated on April 2, 2007 |
| |
|
| |
| |
One of the highlights of my recent trip to Europe was getting the chance to publicly show off some of the new features in our next release of Visual Studio and the .NET Framework (codename: "Orcas") for the first time publicly. You can download the deck I presented here. | | | |