Google Earth to announce 3D bulidings Comments

ZDNet Blogs by Garett Rogers - May 20, '07 8:10am
Google is set to announce a partially exclusive licensing agreement with Stanford that will provide automatically generated 3D models of buildings for Google Earth at Where 2.0. This is likely an attempt to catch up to Virtual Earth's comparable feature announced in November. Until now, Google has relied completely on user generated 3D models which tend to be much higher quality, but hard to come by. This automatic building generator will surely bring cities to life by filling in the 3D gaps between the rare user modeled buildings and flat satellite imagery. It is still uncertain as to what quality we can expect from these generated buildings, but I think it's fair to say that Google will strive meet or...
Be the first to comment this (no registration)

Blizzard Officially Announces StarCraft 2 Comments

eWEEK Technology News - May 20, '07 5:46pm
Blizzard officially announces StarCraft 2, the sequel to one of the most popular games of all time. We've got the details, links to the trailer, and gameplay footage.

Be the first to comment this (no registration)

Top 15 Free SQL Injection Scanners Comments

Slashdot by kdawson - May 20, '07 3:02am
J.R writes "The Security-Hacks blog has a summary of the 15 best free SQL Injection scanners, with links to download and a little information about each one. The list is intended asan aid for both web application developers and professional security auditors."

Read more of this story at Slashdot.

Comment #1 by Nico - May 20, '07 6:06pm
Here's the link: http://www.security-hacks.com/2007/05/18/top-15-free-sql-injection-scanners
1 Comments. Add yours!

Using LINQ to SQL (Part 1) Comments

ASP.NET Blogs by ScottGu - May 19, '07 3:41am

Over the last few months I wrote a series of blog posts that covered some of the new language features that are coming with the Visual Studio and .NET Framework "Orcas" release.  Here are pointers to the posts in my series:

The above language features help make querying data a first class programming concept.  We call this overall querying programming model "LINQ" - which stands for .NET Language Integrated Query.

Developers can use LINQ with any data source.  They can express efficient query behavior in their programming language of choice, optionally transform/shape data query results into whatever format they want, and then easily manipulate the results.  LINQ-enabled languages can provide full type-safety and compile-time checking of query expressions, and development tools can provide full intellisense, debugging, and rich refactoring support when writing LINQ code.

LINQ supports a very rich extensibility model that facilitates the creation of very efficient domain-specific operators for data sources.  The "Orcas" version of the .NET Framework ships with built-in libraries that enable LINQ support against Objects, XML, and Databases.

What Is LINQ to SQL?

LINQ to SQL is an O/RM (object relational mapping) implementation that ships in the .NET Framework "Orcas" release, and which allows you to model a relational database using .NET classes.  You can then query the database using LINQ, as well as update/insert/delete data from it.

LINQ to SQL fully supports transactions, views, and stored procedures.  It also provides an easy way to integrate data validation and business logic rules into your data model.

Modeling Databases Using LINQ to SQL:

Visual Studio "Orcas" ships with a LINQ to SQL designer that provides an easy way to model and visualize a database as a LINQ to SQL object model.  My next blog post will cover in more depth how to use this designer (you can also watch this video I made in January to see me build a LINQ to SQL model from scratch using it). 

Using the LINQ to SQL designer I can easily create a representation of the sample "Northwind" database like below:

My LINQ to SQL design-surface above defines four entity classes: Product, Category, Order and OrderDetail.  The properties of each class map to the columns of a corresponding table in the database.  Each instance of a class entity represents a row within the database table.

The arrows between the four entity classes above represent associations/relationships between the different entities.  These are typically modeled using primary-key/foreign-key relationships in the database.  The direction of the arrows on the design-surface indicate whether the association is a one-to-one or one-to-many relationship.  Strongly-typed properties will be added to the entity classes based on this.  For example, the Category class above has a one-to-many relationship with the Product class.  This means it will have a "Categories" property which is a collection of Product objects within that category.  The Product class then has a "Category" property that points to a Category class instance that represents the Category to which the Product belongs.

The right-hand method pane within the LINQ to SQL design surface above contains a list of stored procedures that interact with our database model.  In the sample above I added a single "GetProductsByCategory" SPROC.  It takes a categoryID as an input argument, and returns a sequence of Product entities as a result.  We'll look at how to call this SPROC in a code sample below.

Understanding the DataContext Class

When you press the "save" button within the LINQ to SQL designer surface, Visual Studio will persist out .NET classes that represent the entities and database relationships that we modeled.  For each LINQ to SQL designer file added to our solution, a custom DataContext class will also be generated.  This DataContext class is the main conduit by which we'll query entities from the database as well as apply changes.  The DataContext class created will have properties that represent each Table we modeled within the database, as well as methods for each Stored Procedure we added.

For example, below is the NorthwindDataContext class that is persisted based on the model we designed above:

LINQ to SQL Code Examples

Once we've modeled our database using the LINQ to SQL designer, we can then easily write code to work against it.  Below are a few code examples that show off common data tasks:

1) Query Products From the Database

The code below uses LINQ query syntax to retrieve an IEnumerable sequence of Product objects.  Note how the code is querying across the Product/Category relationship to only retrieve those products in the "Beverages" category:

C#:

VB:

2) Update a Product in the Database

The code below demonstrates how to retrieve a single product from the database, update its price, and then save the changes back to the database:

C#:

VB:

Note: VB in "Orcas" Beta1 doesn't support Lambdas yet.  It will, though, in Beta2 - at which point the above query can be rewritten to be more concise.

3) Insert a New Category and Two New Products into the Database

The code below demonstrates how to create a new category, and then create two new products and associate them with the category.  All three are then saved into the database.

Note below how I don't need to manually manage the primary key/foreign key relationships. Instead, just by adding the Product objects into the category's "Products" collection, and then by adding the Category object into the DataContext's "Categories" collection, LINQ to SQL will know to automatically persist the appropriate PK/FK relationships for me. 

C#

VB:

4) Delete Products from the Database

The code below demonstrates how to delete all Toy products from the database:

C#:

VB:

5) Call a Stored Procedure

The code below demonstrates how to retrieve Product entities not using LINQ query syntax, but rather by calling the "GetProductsByCategory" stored procedure we added to our data model above.  Note that once I retrieve the Product results, I can update/delete them and then call db.SubmitChanges() to persist the modifications back to the database.

C#:

VB:

6) Retrieve Products with Server Side Paging

The code below demonstrates how to implement efficient server-side database paging as part of a LINQ query.  By using the Skip() and Take() operators below, we'll only return 10 rows from the database - starting with row 200.

C#:

VB:

Summary

LINQ to SQL provides a nice, clean way to model the data layer of your application.  Once you've defined your data model you can easily and efficiently perform queries, inserts, updates and deletes against it. 

Hopefully the above introduction and code samples have helped whet your appetite to learn more.  Over the next few weeks I'll be continuing this series to explore LINQ to SQL in more detail.

Hope this helps,

Scott

Be the first to comment this (no registration)

[Download] Free Enterprise CMS for Microsoft .NET Framework 3.0 & ASP.NET Ajax released! Comments

ASP.NET Blogs by Axinom - May 18, '07 10:13pm

AxCMS.net® was one of the world’s first enterprise content management platforms based on Microsoft .NET framework and developed by Axinom, Microsoft Gold Certified Partner and Vendor based in Germany. AxCMS.net® is a award-winning, multilingual and multi-site compatible solution - completely free of charge! Companies around the world are using the software to provide solutions for both themselves and their customers faster, more easily and at lower costs.

Read our current case study showcased at the Microsoft MIX conference in Las Vegas:
http://www.microsoft.com/casestudies/casestudy.aspx?casestudyid=201425

AxCMS.net® 7.0 introduces compatibility with ASP.NET Ajax making a huge leap forward with personalized user interface, integration into Windows Vista Media Center and enhanced document management capabilities.

FREE DOWNLOAD: http://www.AxCMS.net

 

AxCMS.net® has been designed and developed as a free Enterprise Content Management System based on Microsoft .NET framework since 2001. Today with several thousands of successfully installed systems and an increasing number of satisfied customers more than 50 partners worldwide are using AxCMS.net to build custom based solutions for middle-sized and large customers.

FREE DOWNLOAD: http://www.AxCMS.net 

As the largest AxCMS.net solution provider, Axinom offers development services and solutions to clients in international markets as well as training and support for AxCMS.net.

Be the first to comment this (no registration)

Phone Calls in Google Talk Comments

Google Operating System by Ionut Alex Chitu - May 18, '07 6:55pm
We didn't see any update for Google Talk in the last 5 months (the latest major feature was Vista support), so next release must add something important. A plausible hypothesis is phone calls. Google inserted this screenshot "from the future" in a presentation for Google Apps. We can see revealing messages like: "Show dialpad", "Call details", "Enter a name or phone number".


{ via Blogoscoped Forum }
Be the first to comment this (no registration)

Dell confirms rumors, will build tablet PC Comments

CNET News.com - May 18, '07 5:54pm
Blog: Latitude Tablet PC will be a lightweight convertible notebook with a pen and touch interface. It will be available later this year.
Be the first to comment this (no registration)

Another Ubuntu-hacking chapter available Comments

DesktopLinux.com - May 19, '07 10:26pm
Another chapter of a new how-to book, Hacking Ubuntu: Serious Hacks, Mods and Customizations, has been published online at ExtremeTech.com. This one explores options for configuring devices in Ubuntu's installation process, including where to install Ubuntu, and what options to select that will impact system usability.
Be the first to comment this (no registration)

Apple Sued Over MacBook Display Quality Comments

BetaNews.Com - May 18, '07 4:23pm
Apple is fighting off another lawsuit, this time over claims that its advertising surrounding Macbook displays are misleading. The suit claims the displays only support 262,144 colors - not 16 million.
Be the first to comment this (no registration)

DHH's Rails Keynote Comments

O'Reilly Radar by Brady Forrest - May 18, '07 4:43pm
David Heinemeier Hansson (DHH) is the 37Signals partner who created Rails in 2004 while building Basecamp. He just gave the opening RailsConf keynote on the growth of Rails (a lot) and the new features of Rails 2. Rails was...
Be the first to comment this (no registration)
© 2007 · wiredb.com · All trademarks are properties of their respective owners.