Search

Categories

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Send mail to the author(s) E-mail

# Thursday, May 27, 2010

DevDays – MVC – Scott Hanselman video:

WFT1_2MB_ch9.wmv 1.4GB

Looking at the callstack in debug to see how things are called.

image

IHttpHandler – the ‘simple’ building block of ASP.NET.

Example in c:\code\mvc2\hanselman

image

http://localhost:1476/Home/poop/2

Controller get invoked

Action invoker calls the method

Model Binding – took the other piece of the route data (ie 2) and coerced it into…

didn’t call HttpRequest or anything..

 

Passing a DateTime

image

image

Phil Haack Route Debugger

http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx

 

image

prop tab tab to auto gen the properties. then tab tab, then enter enter!

Create A Controller

Ctrl M, Ctrl C

Convention is HomeController

var p = new person

then ctrl period to import the namespace.

Create A View

Convention is in Views directory, create a new Person directory.

Index method links to Index view

Details method links to details view.

image

image

Ctrl M Ctrl V to create a view, when you are in the appropriate Controller class (eg Index)

Created a strongly typed view.. this Viewpage is of type Person

Model in the viewpage will always be of type T ie Person.

Could use Repository Pattern for the DB

Going live with ASP.NET4 – many hosting providers need you to upgrade to another machine.

image

Going Live on Azure

Created a new MVC2 Web Role project

Upload to test that MVC2 is working somewhat

ViewModel - MVCMusicStore

VS2010 Control comma – navigate to

http://mvcmusicstore.codeplex.com/

Uses Entity Framework.

Uses <%: HTml.DisplayForModel

AutoMapper

FirstName, LastName.. map to FirstName and Surname

image

ViewData

is another way to pass data.

image

ViewEngines

This is the WebForms view engine.

Routing

 

NerdDinner – MVC2 in beta (now it is live 27th May)

there are unit test in here.

image

just asserting not null.

Seperation of Concerns – in controller we can’t have Response.Write.. as it would break in this test.  Would work at runtime.

Comments [0] | | # 
( Azure )

Personal storage

Endpoints:

xxxxx.blob.core.windows.net

xxxx,queue.core.windows.net

xxxx.table.core.windows.net

This part of Windows Azure and not SQLAzure or AppFabric

image

azurestorageexplorer.codeplex.com

image

Also looking at Azure Diagnostics Manager from cerebrate.com

http://social.msdn.microsoft.com/Forums/en/windowsazure/thread/e972b0c0-3a04-4f0c-a73f-ab93552d8291

Example using ASP.NET and Storage and AppFabric Local Dev

http://msdn.microsoft.com/en-us/magazine/ee336122.aspx

Logging

Each app has to do its own logging and write to storage.. an app like this can nicely show what is happening.

image

http://microsoftpdc.com/sessions/svc15 –  this is pdc09

MIX2010 – Building and Deploying Windows Asure Based Apps

http://live.visitmix.com/MIX10/Sessions/SVC09  (Jim Nakashima)

Created a WebRole and a WorkerRole

image

One of the web roles.. when I clicked on the button, the worker role picked up the message from the queue.

Nerdinner MVC1 Migrating to Azure with SQLAzure

Could use Azure tables (examples on the web)

Need to do 3 things:

- Need to make a webrole

- Migrate dinner to use SQLAzure

- Migrate asp.net membership provider for SQLAzure.

Comments [0] | | # 
( SQLServer | VMWare )

 

using the Web Plaform Installer. installation of the Studio didn’t work

tried ccleaner which didn’t work.

http://goneale.com/2009/05/24/cant-install-microsoft-sql-server-2008-management-studio-express/

Trick is to get the DB Server and tools together: **No this is just SQL Server 2008, not R2**

https://www.microsoft.com/downloads/details.aspx?familyid=7522A683-4CB2-454E-B908-E805E9BD4E28&displaylang=en

But as I’d compressed my C:\ drive on WMWare Player it came up with an unusual error.

This is good:

image

image

Expand Boot Drive on VMWare Player3

Need VMWare Player 3.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004047

Can simply edit the drive information in the player GUI, then goto Windows7 click on C:\ drive in admin tools and management, and then do expand volume.

Comments [0] | | # 
# Wednesday, May 26, 2010
( Azure )

http://blogs.msdn.com/b/brandonwerner/archive/2009/11/28/how-to-host-your-site-and-content-on-azure-quickly-and-easily.aspx

Local Development Fabric and Development Storage (uses SQLEXPRESS)

image

Live ‘Fabric’ and Storage which consists of Blob, Queue and Table

image

SQLAzure is something else!

AppFabric is something else.

Comments [0] | | # 
# Saturday, May 22, 2010

Discussed in stackoverflow question.

TFS 2010 basic.. same cost as VSS
Perforce - google use it? USD$800 per user
SourceGear Vault and Fortress - good VSS upscale... USD$300 / $600

SVN.. free...VisualSVN Server.. SVN 1.6.6

fi.github.com - USD$600 per user.. min 10
cobebasehq - ??

The Big Picture

On ‘Joels Test’ here are some of my favourites:

1. Do you use source control?

4. Do you have a bug database?

6. Do you have an up-to-date schedule?

7. Do you have a spec?

8. Do programmers have quiet working conditions?

9. Do you use the best tools money can buy?

source control eg Git
bug tracking eg FogBugz
work items
continuous integration eg Cruise Control
collaberation
document management

Comments [0] | | # 

I’m spiking out a website that needs to have users logging into the front end so they can see their own personal information.

http://www.sitefinity.com/support/forums/sitefinity-3-x/developing-with-sitefinity/public-users-authentication.aspx

They are using ASp.Net 2.0 Membership and Role Model.

Here is an example of using the same membership provider:

http://www.sitefinity.com/support/forums/sitefinity-3-x/bugs-issues/creating-new-user-authentication-and-authorization.aspx

 

here:

http://www.sitefinity.com/blogs/ivan/posts/08-01-07/sitefinity_social_network_platform_part_1_rudimentary_specs_and_ideas.aspx

http://www.sitefinity.com/blogs/ivan/post/08-01-17/sitefinity_social_network_platform_part_2_setting_up_public_side_membership.aspx

 

make a new project to play with

  • Home – visible in navigation
  • Groups – visible in navigation
  • Person – not visible in navigation, Page group
  • Login – not visible in navigation
  • Registration – not visible in navigation

    image

    image

    So have got registration and login working on the front end.

     

    how to display pages only to logged in users?

    image

    image

     

    Manage password

    http://www.sitefinity.com/blogs/josephanderson/posts/08-12-12/change_password_and_password_recovery_controls_in_sitefinity.aspx

    image

    just created a user control withPasswordRecovery and ChangePassword from asp.net.  Then uploaded as an ascx user control.

    **how to get the specific user, so can query against them in the database in a custom control (see contacts example).

     

  • Comments [0] | | # 
    ( Telerik )

    Whilst using Telerik’s CMS SiteFinity (see other blog posts) I started to use their RadGrid.

    So why use these third party components? According to Telerik:

    “…help you build high-quality, professional line of business web applications. …maximizing productivity and creating rich, SEO-friendly, high-performance Enterprise web applications.”

    Their Grid is USD999, and has combined questions in their forums of 100,000 on the grid (over asp.net and asp.net ajax).  It is their most popular control.

    So what can it do?  Here is an example showing LinqToSQL as the ORM

     http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/linqdatasource/defaultcs.aspx

    http://tv.telerik.com/radtips/episode/using-the-linqdatasource-in-your-radgrid

    image

    Got some issues with errors and internal server errors on my shared host. 

    <customErrors mode="off"/>

     

    Theme: Web Blue

    image

    Drop Down:  link to CountryID, a new data Source

    image

    Data Editing:   AllowAutomaticDeletes, Inserts, Updates

    Paging:  PageSize = 20

    MasterTableView, EditMode, InPlace

    image

    and can edit the country as well with a drop down.

    Date – used {0:d} to only get the date

    Cost:

    image

    image

    How to Do a Drop Down based on a filter

    Using a RadComboBox:

    Chosen the datasource, and DataText field = name  and DataValueField  = countryid

    image

    AutoPostBack = true

    Put a conditional on the original linked data source.

    image

    It all works as expected.

    Uploading to live

    Project is now:  TestRadGridTelerik3… uploading to radgrid2 on server

    Add a Record

    image

    Mastertable view, CommandItemDisplay = top

    Manually Controlling The Grid

    I want to be able to insert into the grid, based on my logged in user.  So have to manually hook into the events

    http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/programaticlinqupdates/defaultcs.aspx

    http://www.telerik.com/help/aspnet-ajax/grdlinqtosqlmanualcrudoperations.html

    Using TestRadGridTelerik3 project, addSmart.aspx

    <telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="False" AllowPaging="True"
            OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"
            OnItemCreated="RadGrid1_ItemCreated" OnDeleteCommand="RadGrid1_DeleteCommand"
            OnInsertCommand="RadGrid1_InsertCommand" GridLines="None">

    <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />

    image

    Very nice goodness baked in for delete

    protected void RadGrid1_DeleteCommand(object source, GridCommandEventArgs e)
    {
    var raceId = (Guid) ((GridDataItem) e.Item).GetDataKeyValue("RaceID");

    //retrive entity form the Db
    var race = DbContext.races.Where(n => n.raceid == raceId).FirstOrDefault();
    if (race != null)
    {
    //add the category for deletion
    DbContext.races.DeleteOnSubmit(race);
    try
    {
    //submit chanages to Db
    DbContext.SubmitChanges();
    }
    catch (Exception)
    {
    ShowErrorMessage();
    }
    }
    }

    There is a double click event on the row.. which goes into edit mode.  This is wired up in JavaScript.

    Getting nice js numeric error checking on the input for money and distance.

    image

     

    Have got delete working

    **Update doesn’t work

    **Insert doesn’t work

    **The error message don’t show up properly.

    **changed teh db structure locally for race to allow nulls for categoryid… maybe vioates an FK constraint.??  see profiler?

    Problem with Updating

    Found that I couldn’t understand what was happening.  So went back to the example code by Telerik on: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/programaticlinqupdates/defaultcs.aspx

    Ripped out the code, made a simple LinqToSQL class against 1 table only (Products).  Got it working locally:

    image

    this is called RadGrid4Telerik.

    Next step is to get my example of races working with 1 table only (just like this).  Problem with taking this live is that Northwind is quite a large db and complex and I’ve got average hosting!  Also very good to bring back to basics.

    Comments [0] | | # 

    As the login in based on the .NET2 Membership Provider:

    image

    Next step is to display the ‘races’ that the logged in user has competed in.

    Use a RADGrid approach and LinqToSQL

    image

    **next is to do the linq query.

    http://weblogs.asp.net/scottgu/archive/2007/07/16/linq-to-sql-part-5-binding-ui-using-the-asp-linqdatasource-control.aspx

        need to do a where personID ==

    just using the asp.net grid or even a repeater.. kiss.

    image

    Got it working, however am using

    <asp:LinqDataSource ID="LinqDataSource1" runat="server"
        ContextTypeName="Races.RacesDataClassesDataContext" TableName="races"
        Where="personID == @personID">
        <WhereParameters>
            <asp:ControlParameter ControlID="TextBox1" DbType="Guid"
                DefaultValue="63da93cb-1e76-4093-b74c-44503122d195" Name="personID"
                PropertyName="Text" />
        </WhereParameters>
    </asp:LinqDataSource>

    don’t need default value.

    image

    ideally want to set this directly to the

    MembershipUser mUser = Membership.GetUser();
            string UserID = mUser.ProviderUserKey.ToString();

    Got this working:

    protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e) 
         { 
             MembershipUser currentUser = Membership.GetUser(); 
             Guid currentUserId = (Guid)currentUser.ProviderUserKey; 
             e.WhereParameters["personID"] = currentUserId; 
         }

    <asp:LinqDataSource ID="LinqDataSource1" runat="server"
        ContextTypeName="Races.RacesDataClassesDataContext" TableName="races"
        Where="personID == @personID">
        <WhereParameters>
            <asp:ControlParameter ControlID="TextBox1" DbType="Guid"
                Name="personID"  />
        </WhereParameters>
    </asp:LinqDataSource>

    image

    here is a trick for an error.. couldnt’ replicate.. discussed here: http://weblogs.asp.net/rajbk/archive/2008/01/31/linqdatasource-exceptions.aspx

    add/edit/del

    image

    adding is a bit trickier:

    http://www.codeproject.com/KB/aspnet/LinqDataSource3.aspx

    http://weblogs.asp.net/zeeshanhirani/archive/2008/05/04/using-linqdatasource-for-inserts-updates-and-deletes.aspx

    could just trying using the telerik Grid:

    hmm – getting string errors except when I wire up the where clause to a textbox which is not good!

    image

    All good.. now trying to wire up the delete and edit which don’t seem to work with my select filter on LinqDataSouce.

    Looked at older code for custom edit screens based on backend of SF. 

    Try delete and edit with no filter where clause.

    All working once I sent the properties of the radGrid to do insert/update and delete.

     http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/linqdatasource/defaultcs.aspx

    Adding

    image

    This took ages to find!

    Not working properly.

     http://dotnetnotes.i-do-it.com/CategoryView,category,ContentManagementSiteFinityControls.aspx – interesting notes on delete.

    this would be nice:

    // never seems to hit this.
    public void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
    if (e.Item is GridDataItem)
    {
    GridDataItem dataItem = e.Item as GridDataItem;
    string DataItem = dataItem["nameOfRace"].Text;

    //Add the message to the Button
    LinkButton button = e.Item.FindControl("AutoGeneratedDeleteButton") as LinkButton;
    button.Attributes["onclick"] = "return confirm('Are you sure you want to delete " +
    DataItem + "?')";
    }
    }

    look at telerik RAD Grid add – we want to extend this method to put in the currently logged in users guid too.

    Testing RadGrid in a normal WebApp.  Trick is to copy in the design dll into the bin folder of the project otherwise VS will complain

    http://blogs.telerik.com/atanaskorchev/posts/09-03-06/meet_telerik_web_design_dll.aspx

    image

    image

    Good demos and code for LinqToSQL crud.. aiming to get the Add new record working and passing through the categoryID.

    http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx – Scott Gu guide for LinqToSQL

    Now getting this when putting together a test web app using the telerik control, and linq to sql.  Strange!

    image

    some stuff in here for probable fixes, however doesn’t feel right: http://forums.asp.net/t/1264863.aspx

     http://www.telerik.com/help/aspnet-ajax/grdlinqtosqlbindingcrudoperations.html – good manual for radgrid.

    Going through a video:http://tv.telerik.com/radtips/episode/using-the-linqdatasource-in-your-radgrid

    Had to register my RadScriptManager to get things working.

    image

    inline editing is good.

     

    try and put the sample from the video live – what are the licensing restrictions on the radcontrols I’m running?

    image

    The Data context generated by the designer will live in the .Data namespace

    The Tables generated will live in the .Entities namespace.

    image

    Adding a drop down for category in the grid… linked to another linqDataSouce not yet created

    image

    now adding a RadComboBox.  AutoPostBack is true and Name is Name and ID is ProductCategoryID

    image

    configuring the products data source to be conditional of the drop down combo box.

     image

    The crowd goes wild :-)

    tidy up files  and remember what I am aiming to do.

    make live

      put database up there.. or 2 tables anyway.

     

    Why Use RADGrid?

    http://dotnetslackers.com/SQL/re-135853_HowTo_Telerik_RadGrid_Master_Detail_client_side_data_binding_using_LINQ_to_SQL_and_WebService.aspx

    Go Live With RadGrid2

    As things never go to plan when going live…

    http://tv.telerik.com/radtips/episode/using-the-linqdatasource-in-your-radgrid

    Remember to put in the Web.Design.dll into the bin directory (as we haven’t installed the tools into the GAC)

    Register the scriptmanager with web.config.

     

    Making the testgrid1 application live, and finding lots of issues with the too complex adventureworks2008 database

    **todo – make a simple version of this database with the existing products.

    Project is called TestRadGridTelerik2 – see work items for where I’m up to.

    radgrid2.mateerit.co.nz

    Comments [0] | | # 

    Rough notes for Sitefinity. And how to develop easily custom modules (see end of post).

    http://www.sitefinitywatch.com/blog/09-05-04/Bullet_Proof_Guide_to_Installing_Sitefinity_3_x.aspx

    Installing on Windows XP.. Had to use internet explorer to gefFt integrated authentication passing through properly:

    http://localhost/telerik/sitefinity3.7/

    image

    getting the correct user for the database.. tried to add the aspnet user into the database as an admin.

    image

    this was a UI bug, just ran again F5 and it worked!

    image

    image

    The crowd goes wild :-)

    http://www.sitefinitywatch.com

    http://www.sitefinity.com/

     

    Deploying

    http://www.sitefinity.com/support/kb/sitefinity-3-x/discount-asp-net-hosting-provider.aspx for shared hosting plan.

    http://www.sitefinity.com/support/kb/sitefinity-3-x/godaddy-asp-net-hosting-provider.aspx 

    http://www.sitefinity.com/documents/InstallationGuide_3_7.pdf – install guide

    cmstest.mateerit.co.nz

    backed up database on live server

    used SQL2008 Management Studio to do Create to Script and uploaded the database tables that way.

    Live site worked with just changing the connection string in web.config

    however the admin site won’t let me login.hmm if I changed the URL to:

    http://cmstest.mateerit.co.nz/Sitefinity/Admin/Default.aspx

    I then got a 404 error on editing a page,

    Second, you need to turn off healthMonitoring:
    <healthMonitoring enabled="false" heartbeatInterval="0">

    I then got a 404 again.. hmmm

    image

    image

    [done]Licensing

    They have just turned off the Community Edition.

    Get going in visual studio – see support and live documentation.

    get going live on openhost – have sent an email.

    look at documents on the web showing how to do stuff in Sitefinity and case studies.

    how to embed controls and pages in SF – tutorial webcast?

     

    Changing the order of menu items

    properties of pages (ie whether they are listed in the menus)

    adding in images into pages

    permissions on pages

    Services

    eg RSS, Search…These are applications that other modules can use

    Modules

    Generic Content – text and images

    News

    publishing news

    pub date, expiration

    Blogs

    category, comments (shared with news and generic too)

     

    Lists

    FAQ’s

    List of people in a company

    Polls

    Polls, surverys – multi

    Forums

    Images and Documents

    Files?

    Events

    Newsletter

    Wikis

    Added in 3.7

    strange renderiing issue.

    Generic Content

    can share content across the site.

    News

    Categories – these are hierarchial.. these are different categories to other modules.

    Tags – these are flat level

    Permissions – who can do what.

    6:00 in and video died

    CntCatID ** didn’t work well

    Polls

    Works fine.

    Master Page and Theming Video

    making a new master page and theme

    User Controls

    made an ascx using the Telerik RadTextBox

    image

    created it in MyControls, then uploaded, which SF put in UserControls:

    image

    Upload was at the bottom here, and it was put into Misc:

    image

    Creating Custom Modules - Contacts

    Video here:

    http://www.sitefinity.com/support/video-tutorials/extending-sitefinity/adding-complex-functionality-through-custom-modules.aspx

    code here":

    http://www.sitefinity.com/blogs/ivan/posts/09-02-26/sample_pluggable_module_contacts_pluggable_module.aspx

    nolics.Engine.v4.2  dal

    references to Telerik.Cms.Web.UI – has exclamation mark

    also Telerik.Web.UI.. versioning?  Deleted the reference, and added in the new one, and it seems to work.

    Here is the management interface for the new contacts module:

    image

    and the front end:

    image

    and the full page:

    image

    Working With SiteFinity API

    Simple User Control – blog form.

    News, Pages

    A custom page which programatically calls

    image

    so we created a demo blog programatically through the SF API.

    image

    image

    User Management, Permissions and Workflow

    image

    setting permissions for the news module for John (who is in the role News Role Special)

    image

    And for Pages:

    image

    Turning on Workflow:

    image

    Made a page and now it is for approval by an admin:

    image

    Adding Custom Fields

    Here he added in a price to an event, then hooked it up to a Google Checkout link.

     

    Other videos

    http://vimeo.com/channels/sitefinity#9986165 – Falafel

    http://stackoverflow.com/questions/213719/how-do-you-create-a-visual-studio-solution-file-sln-in-the-same-directory-as-t – solution file

    ** am here http://cdn-static.viddler.com/flash/simple_publisher.swf?key=a83a6fef

    Tricks with the SF API Video

    how to get solution coming up in explorer window?

    ICMSPage

    image

    image

     

    http://www.falafel.com/training/Sitefinity/sitefinityfaq.aspx

    try dragging in Telerik.Web.UII.dll into VS to use the controls.

    Look at Linq contacts example.

    Modules – if need front end and back end

    User Control or Custom Control – if only need front end

    Tool – if only need back end.

    Custom Modules – Contacts

    http://www.sitefinity.com/blogs/ivan/posts/09-02-26/sample_pluggable_module_contacts_pluggable_module.aspx – 26th Feb 2009.  3.6 Arch.

    this has 2projects in it:

    image

     

    intra site module if don’t need the module across many implementations of SF

    image

    Installed an older version of Contacts from 2007:  http://www.sitefinity.com/blogs/ivan/posts/07-12-20/sitefinity_intra-site_modules_the_unbearable_lightness_of_development.aspx

    no**how it accesses data?

    created 2 new tables in the db – smplt_Contacts and smpl_Departments

    added in some files:

    App_Code\Contacts

    image

    image

    So now have:

    image

    and can add/edit/delete from here:

    image

    and data is going where we expect it:

    image

    and wired up on the front end:

    image

    and how to link to a details page:

    Intra Site Module 3.6 Version of Contacts using Nolics

    http://www.sitefinity.com/blogs/ivan/posts/09-02-26/sample_pluggable_module_contacts_pluggable_module.aspx

    image

    http://www.sitefinity.com/support/video-tutorials/extending-sitefinity/adding-complex-functionality-through-custom-modules.aspx – see telerik video_551pro.flv

    This is the easier and faster way to develop modules.

    ContactsModule is the central class which inherits from SecuredModule.

    Admin / ContactsCommandPanel (smaller panel on left

    image

    Admin / ContactsControlPanel (larger control on the right)

    image

    ContactsManager – middle man between presentation and data layer… so can put in another provicer eg for xml instead of database

    ContactProvider – abstract class.. sort of interface

    DAL.Contact.dbclass – nolics definition

    DAL.DefaultProvider – inherts the ContactsPRovider abstract class.  where stuff gets saved to orm.

    front end.web.config

    put in a custom module

    register module with SF

    declare a module section and declare the providers we will be using in that module.

     

    Intra Site Module Contacts – LINQ Provider (pre 3.6)

    image

    highly recommended to use the new style of architecture.

    Contacts Intrasite (3.6) – ie not a pluggable module

    this doesn’t have the 3 projects..just simple code!

    image

    image

    create new SF website – yellow

    move virtual directory to c:\code\sitefinity\yellow

    load in a new solution in VS

    add into git.

    add in contacts module.

    create 2 new tables in the database… smpl_Contacts and smpl_Departments

    image

    App_Code

    image

    ContactsModule is the central class which inherits from SecuredModule.

    ContactsManager – middle man between presentation and data layer… so can put in another provicer eg for xml instead of database

     

    image

    image

    image

    image

    then in the web.config search for toolboxControls and add in after the <clear />

    <add name="Contacts List" section="Contacts" url="~/Modules/Contacts/Views/Frontend/ContactsListView.ascx" />
    <add name="Single Contact" section="Contacts" url="~/Modules/Contacts/Views/Frontend/SingleContactView.ascx" /> 

    Figure out how it works – front end first

    the user view simply has a SqlDataSource in it with SQL embedded in the page.

     

    Books Module (3.6)

    Also there is a books example based of the 3.6 new architecture:

    http://www.sitefinity.com/blogs/ivan/posts/09-01-25/sitefinity_3_6_beta_-_sample_bare_bones_module_on_the_new_backend_architecture.aspx

    hmm – not quite the same format as contacts.

    Contacts Module LINQ (pre 3.6)

    **also need to look at the LINQ provider example in downloads – loos like same contacts example but using linq.

    Products Module (looks like 3.6) – pluggable module?

    image

    asdf

    RSS Service Module – 17th July 2009

    http://www.sitefinity.com/blogs/dilyanrusev/dilyanposts/09-07-17/implementing_rss_a_simple_rss_bare-bones_rss_module.aspx

     

    Video on Intra Site Module Creation _451

    Notes here: http://sitefinitywatch.com/notes/09-04-16/Introduction_to_Sitefinity_Intra-Site_Module_Creation.aspx

    April 16th 2009

    Intra-Site module – code is stored in App_Code

    Uses LINQ

    To Create a new module all we need is: in App_Code\Contacts\ContactsModule.cs

    image

    Command panel – left

    Control panel – right

    Wired Up control panel to an ascx

    image

    sw_contacts

    sw_departments

    Problem with Linq not recognising the FK Relationship.  Went into the diagram explorer in Sql server and it worked fine.

    image

    Changed names to Department and Contact.  Set ID’s to be Auto Generated.

    Generic content - can take care of persisting the data for you in SF

    Here we are handing our data manually.

    problem referencing RAD Grid from telerik

    : 16min into video

    http://www.telerik.com/community/forums/aspnet/general-discussions/error-creating-template-groups-for-all-controls.aspx

    My toolbox is referencing 2010.1.309.35

    http://blogs.telerik.com/kevinbabcock/posts/08-12-23/visual_studio_ldquo_error_creating_control_rdquo.aspx

    tried deleting the project assemblies:

    C:\Documents and Settings\[username]\Local Settings\Application Data\Microsoft\VisualStudio\9.0\ProjectAssemblies (Windows XP)

    trying to delete C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

    This worked!!!

    http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/ajax-2-9-q2-release-giving-me-gray-hair.aspx

    image

    Using RADGrid.  2 LINQ Data Sources.  The first which is bound is to Contacts (which has crud working).  The second is to departments which is read only.

    image

    putting in a DridDropDownColumn:

    image

    image

    The crowd goes wild.

    image

    image

    Doing the insert:

    image

    So we can now create read update and delete to the contacts table via the backend of SF..we can read from another linked table too (department).  Using Linq to SQL so have written no SQL.  SF includes authentication.

    image

    How to Manage Departments?

    image

    Here we are using an asp:MultiView, a link button and

    image

    However this method can get complex really quickly.. so going to look at 3.6 features:

    3.6 Views

    We have deleted the user control which was in Contacts called ControlPanel.ascx  and made 4 more granular ones.

    changed the ContactsModule from

    return parent.LoadControl("~/Custom/Modules/Contacts/ControlPanel.ascx");

    to

    return new ContactsControlPanel();

    which is a new class which loads up the more granular ones

    image

    image

    The user controls need to inherit from:  ViewModeUserControl<ContactsControlPanel>

    This is a new concept in 3.6

    image

    However we want slightly different views so:

    Create ContactsView and DepartmentsView which hold 2 children each.

    image

    image

    Make it look nicer:

    image

    <MasterTableView CommandItemDisplay="Top" DataKeyNames="Id" CssClass="listItems" width="98%"

    added some divs:

    <div class="workArea">
        <div id="gridPlaceholder">

    Wiring up Add Button which is just an asp hyperlink.

    image

    image

    image

    Added in  Linq code for add and edit.

    Added in a new view so when go to Add new Contact, it displays a nice breadcrumb.  Even though it actually goes to the edit view!

    image

    image

    Front end displaying the data.

     

    Controls

    User Controls – Simplest way to bring in business logic.   inherit from System.Web.UI.UserControl.

    image

    making the Control Title property editable by the back end.

    image

    making the bulleted list editable (how it looks)

    Towards the end of the examples in the docs, it does persist data.

    **Ivans blogs on Control Designers?

     

    LinqCommere and Free Templates

    http://www.josephmanderson.com/technology/OpenSourceCommunity/templates.aspx

    **review rest of flv videos

    How To Deploy Easily?

    This is a ‘Web Site’ and not a ‘Web Application Project’

    http://www.microsoft.com/downloads/details.aspx?FamilyId=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&displaylang=en

    I usually do the pre build events in Projects to change my db connection stri9ng.

    **Look in the forums on SF site

    ** keep watching videos.

    **look on youtube for sitefinity

    **how to develop in SF – environemtn.. change to Web Application Project?

    read this sometime: http://logisolve.blogspot.com/2009/02/aspnet-and-content-management-teleriks.html

    ### It is fairly easy to develop a back end intra site module that does admin stuff.  Custom.  I went on to look at Telerik RAD Controls before writing this up.  There should be a good example sln.  There was a video which was excellent on intra site stuff.

    Comments [0] | | #