Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Is it possible to have 3-tier design with BindingContext

Is it possible to have 3-tier design with BindingContext

Scheduled Pinned Locked Moved C#
designdatabasewpfwcfquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kakarato
    wrote on last edited by
    #1

    I try to design an database application with 3 tier,design. So is it possible to pass all the Binding Context from User Interface Layer (UI Layer) to (DATA Layer) and then update the Binding Data in Logic Layer ? Where DATA LAYER is a data class which is collection of the Field Name and Value only. Sorry for my poor english..:sigh:

    T M 2 Replies Last reply
    0
    • K kakarato

      I try to design an database application with 3 tier,design. So is it possible to pass all the Binding Context from User Interface Layer (UI Layer) to (DATA Layer) and then update the Binding Data in Logic Layer ? Where DATA LAYER is a data class which is collection of the Field Name and Value only. Sorry for my poor english..:sigh:

      T Offline
      T Offline
      Trance Junkie
      wrote on last edited by
      #2

      What is a 3 tier,design ? :sigh:

      K 1 Reply Last reply
      0
      • T Trance Junkie

        What is a 3 tier,design ? :sigh:

        K Offline
        K Offline
        kakarato
        wrote on last edited by
        #3

        Sorry for my poor english to make you confuse.. A typical 3.Tier Architecture is write the software in 3 part. 1.Presentation Tier 2.Bussiness Tier 3.Data Access Tier Please check out link below: http://www.c-sharpcorner.com/Tutorials/Building3TierAppPA.asp[^]

        T 1 Reply Last reply
        0
        • K kakarato

          Sorry for my poor english to make you confuse.. A typical 3.Tier Architecture is write the software in 3 part. 1.Presentation Tier 2.Bussiness Tier 3.Data Access Tier Please check out link below: http://www.c-sharpcorner.com/Tutorials/Building3TierAppPA.asp[^]

          T Offline
          T Offline
          Trance Junkie
          wrote on last edited by
          #4

          Thanks for da link man:-D,sorry i cant answer your question !:(( Did you check out my question about the "ticket system":-D

          1 Reply Last reply
          0
          • K kakarato

            I try to design an database application with 3 tier,design. So is it possible to pass all the Binding Context from User Interface Layer (UI Layer) to (DATA Layer) and then update the Binding Data in Logic Layer ? Where DATA LAYER is a data class which is collection of the Field Name and Value only. Sorry for my poor english..:sigh:

            M Offline
            M Offline
            Marc Clifton
            wrote on last edited by
            #5

            kakarato wrote: Where DATA LAYER is a data class which is collection of the Field Name and Value only. Yes. However, in your data class you'll need to implement properties for your fields. You class needs to implement [propertyName]Changed events for all your properties, and the property setters need to check if the value has changed and, if the xxxChanged event is not null, fire the event. Also, you need to initialize your fields usually. If you don't do the event stuff, you won't get 2 way data binding. Like this:

            public class MyData
            {
            	protected string myText;
            	public event EventHandler MyTextChanged;
            
            	public string MyText
            	{
            		get {return myText;}
            		set
            		{
            			myText=value;
            			if (MyTextChanged != null)
            			{
            				MyTextChanged(this, EventArgs.Empty);
            			}
            		}
            	}
            
            	public MyData()
            	{
            		myText="Initial Value";
            	}
            }
            

            I was going to write an article on "Intro to data binding" at some point! Marc My website
            Latest Articles: Undo/Redo Buffer Memento Design Pattern

            K 1 Reply Last reply
            0
            • M Marc Clifton

              kakarato wrote: Where DATA LAYER is a data class which is collection of the Field Name and Value only. Yes. However, in your data class you'll need to implement properties for your fields. You class needs to implement [propertyName]Changed events for all your properties, and the property setters need to check if the value has changed and, if the xxxChanged event is not null, fire the event. Also, you need to initialize your fields usually. If you don't do the event stuff, you won't get 2 way data binding. Like this:

              public class MyData
              {
              	protected string myText;
              	public event EventHandler MyTextChanged;
              
              	public string MyText
              	{
              		get {return myText;}
              		set
              		{
              			myText=value;
              			if (MyTextChanged != null)
              			{
              				MyTextChanged(this, EventArgs.Empty);
              			}
              		}
              	}
              
              	public MyData()
              	{
              		myText="Initial Value";
              	}
              }
              

              I was going to write an article on "Intro to data binding" at some point! Marc My website
              Latest Articles: Undo/Redo Buffer Memento Design Pattern

              K Offline
              K Offline
              kakarato
              wrote on last edited by
              #6

              Thanks lot. Hope to able to read your new article as soon as possible. I think it may help me to be more understand on the 2 -way binding. Again Thanks.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups