SlideShare a Scribd company logo
1 of 63
Social Photos
 How we make it
What is Social Photos?
• Online social network for photographers and
  photo lovers.
• Take a photo -> share
• Like / dislike / commend
• Follow other
• List photo near current
  location
Location based feature
Social Photos integrates
Microsoft and non Microsoft
technologies seamlessly
http://socialphotos.codeplex.com
Step to do #1
• Design a social network
  – GUI prototyping
  – Architect design
  – Database modeling
• Web service: from client-server to client-
  cloud
Step to do #2
• Different clients connects to social network
  – Windows Form / ASP.net
  – Windows Phone 7.1
  – Android / iOS
• Web for PC & Mobile: HTML5, CSS3, JavaScript
• Visual Studio Light Switch
• Q&A
Design “social photos”

GUI Prototype

  Architect

    Database
GUI mock up: simple but work
1. Hand sketch on white board
2. Capture by phone camera
3. Write script to explain
4. Email or check-in to collaboration portal
GUI mock up: work better
See demo
Social Photos Database design
• 1 photo is owned by 1 user
• 1 photo is classified by 0-n categories
• 1 user can make 0-n comments on
  photo.
MS SQL
Server, DB2, Oracle, MySQL, PostgreSQL, SQ
        Lite, SAP Sysbase, Informix…
Entity Framework: 3 ways to design
• Database First: reverse engineer from existing DB.
• Model First: visually model tables -> generate DB
  script
• Code First: define class then -> generate DB script
Architect: Open, Simple, Efficient


        Communication
            Server
          Protocol ?
Architect: Open, Simple, Efficient
• Web serviced server
• Work well with Entity Framework
• Upgrade to Cloud without rewriting client
  code
Problems
• Uniform Data Access is hard
  – Standards exist
     •   ODBC
     •   JDBC
     •   OLEDB
     •   SOAP
     •   WCF Service
• Need a multiplatform-supported web service
HTTP - Websites (1992)



• Support Verbs: CRUD operations
  –   GET: select
  –   PUT: update
  –   POST: insert
  –   DELETE: remove
SOAP web services (2000)
Inside SOAP
• XML messages
• HTTP Post only
RESTful web services (2006)
• REST: representational State transfer
• Each unique URL is a representation of some
  objects
A RESTful web service
OData – Open Data protocol
•       Open
    –      Based on web standards: HTTP, AtomPub, JSON
•       Data
    –     For querying and updating data
    –     Different data sources (db, cms, files, etc.)
•       Protocol
    –     Convention for representing data entities in AtomPub
    –     Query string conventions for addressing and filtering data
    –     Constrained HTTP operations for submitting request
SDKs




JavaScript
Producers
SQL Azure      SQL Reporting Services


  SharePoint 2010
OData and WCF Data Service
• Demo PhotoCloud.svc
• Demo using LINQPad to build up query
  string
Demo PhotoClound.svc
• Query: GET
• Insert : POST
    – Url: http://localhost/SocialPhotos/PhotoCloud.svc/Categories
    – Header:
        User-Agent: Fiddler
        Content-Type: application/json
        Content-Type: application/json
        Host: localhost:88
        Content-Length: 17
    – Body: {"Name": "New Category"}
• Update: PUT
    – Body: {"Name": "Black and White"}
• Delete : DELETE
//page size = 2, get 3rd page of top rated
       (from p in Photos
LINQ

       where p.Likes > 0
       orderby p.Likes descending
       select p).Skip(4).Take(2)

       http://localhost:88/SocialPhotos/PhotoCloud
URI




       .svc/Photos()?$filter=(cast(Likes,'Edm.Int32'))
       gt 0&$orderby=Likes desc&$skip=4&$top=2
REST                           OData
Essence            Pattern, architecture style,   Protocol enabling REST
                   or approach

Querying capability N/A                           Y

Order returned     Have to create custom          Y
data               method
Paging returned    Have to create custom          Y
data               method
SOAP                       REST

Verb                       POST                       POST, GET, DELETE, PUT
Resource Identification    N/A                        Y
Transport protocol         HTTP only                  HTTP, TCP, SMTP, JMS, MQ, BEEP,
                                                      IIOP
Payload format             SOAP format                POX, JSON
Bandwidth                  Heavier                    Lighter
Use proxy in client side   Y                          N
Toolkit required           Y                          N
Authorization              Depend on app developers   Webserver can help (with verbs)

Advantages                 Easy to consume            Human Readable Results
                                                      Easy to build (no toolkit)
OData response formats
WCF Data Service - Interceptors
// Define a query interceptor for the Orders entity set.
[QueryInterceptor("Orders")] public
Expression<Func<Order, bool>> OnQueryOrders()

Add custom logic to operation or to entity query
  – Validation
  – Restriction
  – Authorization
  – Logging
[QueryInterceptor("Branches")]
public Expression<Func<Branch, bool>> OnQueryBranches()
{
       return (o) => o.Address != "Obsolete location";
}
[ChangeInterceptor("Customers")]
public void OnCustomerAdd(Customer c, UpdateOperations ops)
{
       if (ops == UpdateOperations.Add)
        {
               if (c.Name.Trim().Equals(String.Empty))
               {
                      throw new DataServiceException(403,
                              "Customer names must not be empty");
               }
        }
}
CLIENT SIDE DEVELOPMENT
Windows Phone 7.1 – Android – iOS – Web Mobile
New features in Windows Phone 7.1
•   Multi tasking
•   Back ground agent (back ground audio – transfer)
•   Access sensors: accelerometer, gyroscope, compass
•   Silverlight 4 built in
•   Support socket programming TCP – UDP
•   Get information of network
•   Push notification
•   Live titles
New features in Windows Phone 7.1
•   Visual Basic support
•   Advertising SDK
•   Web Browser control == IE9. Speed & HTML5
•   Local database == SQL CE
•   Isolated storage explorer
•   Add new launchers and choosers
•   Allow read only access user’s contacts & calendar
•   Program camera (raw frame, adjust focus)
New features in Windows Phone 7.1
•   Scheduler task
•   Encrypted credential store
•   Many and many more
•   ODATA Client !
OData for Windows Phone 7.1

                    URI
 WCF Data Service            HTTP
     Entity
              EDM
                    URI   OData feed
  Framework
   Provider
                    URI
OData for Windows Phone 7.1
• DataServiceCollection<T>
    Extends ObservableCollection<T>
    Automatic change tracking

• DataServiceContext
    Data querying & updating
    Client side change tracking
    DataServiceQuery<TEntity> properties
OData for Windows Phone 7.1
• DataServiceCollection<T>
   LoadAsync(IQueryable<T>)
     1. LINQ to DataServiceQuery<T>
     2. URI
   LoadCompleted event
     • Optional Handler
     • Handle errors, perform additional work
OData for Android
OData for iOS
• http://odataobjc.codeplex.com/
• See video demo
WEB FOR MOBILE
HTML5, CSS3, JavaScript
Native app development pros -cons
• Pros:
  – Performance
  – Features rich:
    camera, GPS, accelerometer, compass, calendar, contacts,
    SMS, …
  – GUI & usability fine tune
• Cons:
  – Different programming languages: Windows Phone
    (C#, Visual Basic), Android (Java), iOS (Objective C)
  – Learning curve & maintaining cost is high
1. HTML 5- CSS3-JavaScript:
   PhoneGap, jQueryMobile, jQTouch, Sencha
   Touch,….

2. Appcelerator’s Titanium Mobile: converts JavaScript
   to symbolic files then compile to native apps


3. Porting apps: reuse code/ resource , modify code
   to adapt to each platform.
Demo

• WebMobile on PC
• WebMobile on WindowsPhone
• WebMobile on Android
VISUAL STUDIO LIGHT SWITCH
Deploying LightSwitch apps
Data sources in LightSwitch

   SQL Server




SharePoint 2010
LightSwitch Architecture




                                                                                Data Access
                                             Middle Tier
Client Tier




                                                           Submit
              Screens   Methods   Controls                            Queries
                                                           Pipeline
                  Data Workspace                           Data Workspace
The LightSwitch Development Experience


  Describe your data   Author business logic   Define custom queries


  Create screens for     Customize screen           Create custom
    common tasks              layouts            Silverlight controls

                                               Integrate with custom
                       Define custom queries
                                                    data sources
Requirements
• Visual Studio Pro (or higher) + SP1
• Visual Studio LightSwitch
• Optional
  – Visual Studio SDK: For building VSIX packages
  – LightSwitch Extension Development Kit (coming
    soon)
LESSON LEARNED IN DEVELOPING
MULTIPLATFORM APPLICATIONS
• GUI – ARCHITECT- DB
• Team Collaboration: Vision, Process, Attitude &
  Tool
• Development Environment
• Transparent communication
QUESTION & ANSWER
Social Photos - My presentation at Microsoft Tech Day

More Related Content

What's hot

Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platformAlfresco Software
 
Jee技术在移动互联网中的应用
Jee技术在移动互联网中的应用Jee技术在移动互联网中的应用
Jee技术在移动互联网中的应用javabloger
 
Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012Bruno Borges
 
Load Balancing und Beschleunigung mit Citrix Net Scaler
Load Balancing und Beschleunigung mit Citrix Net ScalerLoad Balancing und Beschleunigung mit Citrix Net Scaler
Load Balancing und Beschleunigung mit Citrix Net ScalerDigicomp Academy AG
 
Dave Carroll Application Services Salesforce
Dave Carroll Application Services SalesforceDave Carroll Application Services Salesforce
Dave Carroll Application Services Salesforcedeimos
 
Developing Apps with CA Plex + CM WebClient
Developing Apps with CA Plex + CM WebClientDeveloping Apps with CA Plex + CM WebClient
Developing Apps with CA Plex + CM WebClientCM First Group
 
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5SoftEngine
 
(ATS3-GS02) Accelrys Enterprise Platform in Enterprise Architectures
(ATS3-GS02) Accelrys Enterprise Platform in Enterprise Architectures(ATS3-GS02) Accelrys Enterprise Platform in Enterprise Architectures
(ATS3-GS02) Accelrys Enterprise Platform in Enterprise ArchitecturesBIOVIA
 
JUDCon London 2011 - Elastic SOA on the Cloud, Steve Millidge
JUDCon London 2011 - Elastic SOA on the Cloud, Steve MillidgeJUDCon London 2011 - Elastic SOA on the Cloud, Steve Millidge
JUDCon London 2011 - Elastic SOA on the Cloud, Steve MillidgeC2B2 Consulting
 
Websphere Portal
Websphere PortalWebsphere Portal
Websphere Portaldominion
 
01. Portal Business Overview
01. Portal Business Overview01. Portal Business Overview
01. Portal Business OverviewNick Davis
 
Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content RepositoryGabriel Walt
 
Ajax In Enterprise Portals Wesley Hales
Ajax In Enterprise Portals Wesley HalesAjax In Enterprise Portals Wesley Hales
Ajax In Enterprise Portals Wesley Halesrajivmordani
 
Ajax World Oct2008 Jrd
Ajax World Oct2008 JrdAjax World Oct2008 Jrd
Ajax World Oct2008 Jrdrajivmordani
 

What's hot (20)

Developer’s intro to the alfresco platform
Developer’s intro to the alfresco platformDeveloper’s intro to the alfresco platform
Developer’s intro to the alfresco platform
 
CQ 5.4 Deep-Dive
CQ 5.4 Deep-DiveCQ 5.4 Deep-Dive
CQ 5.4 Deep-Dive
 
Jee技术在移动互联网中的应用
Jee技术在移动互联网中的应用Jee技术在移动互联网中的应用
Jee技术在移动互联网中的应用
 
Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012
 
Load Balancing und Beschleunigung mit Citrix Net Scaler
Load Balancing und Beschleunigung mit Citrix Net ScalerLoad Balancing und Beschleunigung mit Citrix Net Scaler
Load Balancing und Beschleunigung mit Citrix Net Scaler
 
Dave Carroll Application Services Salesforce
Dave Carroll Application Services SalesforceDave Carroll Application Services Salesforce
Dave Carroll Application Services Salesforce
 
Nick harris-sic-2011
Nick harris-sic-2011Nick harris-sic-2011
Nick harris-sic-2011
 
Crx 2.2 Deep-Dive
Crx 2.2 Deep-DiveCrx 2.2 Deep-Dive
Crx 2.2 Deep-Dive
 
Developing Apps with CA Plex + CM WebClient
Developing Apps with CA Plex + CM WebClientDeveloping Apps with CA Plex + CM WebClient
Developing Apps with CA Plex + CM WebClient
 
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5
Silverlight 4 & Windows Phone 7 at Zup Zip Black Coffee#5
 
(ATS3-GS02) Accelrys Enterprise Platform in Enterprise Architectures
(ATS3-GS02) Accelrys Enterprise Platform in Enterprise Architectures(ATS3-GS02) Accelrys Enterprise Platform in Enterprise Architectures
(ATS3-GS02) Accelrys Enterprise Platform in Enterprise Architectures
 
JUDCon London 2011 - Elastic SOA on the Cloud, Steve Millidge
JUDCon London 2011 - Elastic SOA on the Cloud, Steve MillidgeJUDCon London 2011 - Elastic SOA on the Cloud, Steve Millidge
JUDCon London 2011 - Elastic SOA on the Cloud, Steve Millidge
 
Websphere Portal
Websphere PortalWebsphere Portal
Websphere Portal
 
01. Portal Business Overview
01. Portal Business Overview01. Portal Business Overview
01. Portal Business Overview
 
IBM WebSphere Portal
IBM WebSphere PortalIBM WebSphere Portal
IBM WebSphere Portal
 
Web Apps atop a Content Repository
Web Apps atop a Content RepositoryWeb Apps atop a Content Repository
Web Apps atop a Content Repository
 
Drive dam
Drive damDrive dam
Drive dam
 
Ajax In Enterprise Portals Wesley Hales
Ajax In Enterprise Portals Wesley HalesAjax In Enterprise Portals Wesley Hales
Ajax In Enterprise Portals Wesley Hales
 
Ajax World Oct2008 Jrd
Ajax World Oct2008 JrdAjax World Oct2008 Jrd
Ajax World Oct2008 Jrd
 
Java ee introduction
Java ee introductionJava ee introduction
Java ee introduction
 

Similar to Social Photos - My presentation at Microsoft Tech Day

IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassPaul Withers
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop OverviewShubhra Kar
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworksukdpe
 
C# Client to Cloud
C# Client to CloudC# Client to Cloud
C# Client to CloudStuart Lodge
 
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)Arrow Consulting & Design
 
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalAlessandro Pilotti
 
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...UA Mobile
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopJimmy Guerrero
 
Memonic Architecture
Memonic ArchitectureMemonic Architecture
Memonic ArchitecturePatrice Neff
 
Azure app service to create web and mobile apps
Azure app service to create web and mobile appsAzure app service to create web and mobile apps
Azure app service to create web and mobile appsKen Cenerelli
 
Convertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo | MADP & MBaaS
 
DreamFactory Essentials Webinar
DreamFactory Essentials WebinarDreamFactory Essentials Webinar
DreamFactory Essentials WebinarDreamFactory
 
Polysource-IT Profile
Polysource-IT ProfilePolysource-IT Profile
Polysource-IT ProfileHelen
 
Polysource-IT Profile
Polysource-IT ProfilePolysource-IT Profile
Polysource-IT ProfileHelen
 
Couchbase Mobile on Android
Couchbase Mobile on AndroidCouchbase Mobile on Android
Couchbase Mobile on AndroidPhilipp Fehre
 
Alex Wade, Digital Library Interoperability
Alex Wade, Digital Library InteroperabilityAlex Wade, Digital Library Interoperability
Alex Wade, Digital Library Interoperabilityparker01
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesAndrew Ferrier
 

Similar to Social Photos - My presentation at Microsoft Tech Day (20)

IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
Databasecentricapisonthecloudusingplsqlandnodejscon3153oow2016 160922021655
 
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns FrameworksMike Taulty MIX10 Silverlight 4 Patterns Frameworks
Mike Taulty MIX10 Silverlight 4 Patterns Frameworks
 
C# Client to Cloud
C# Client to CloudC# Client to Cloud
C# Client to Cloud
 
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
Getting Started with ASP.NET Core 1.0 (formerly ASP.NET 5)
 
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignalITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
ITCamp 2012 - Alessandro Pilotti - Web API, web sockets and RSignal
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
 
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
Azure App Services для создания бэкенда мобильных приложений. Parse Open Sour...
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 
Memonic Architecture
Memonic ArchitectureMemonic Architecture
Memonic Architecture
 
Azure app service to create web and mobile apps
Azure app service to create web and mobile appsAzure app service to create web and mobile apps
Azure app service to create web and mobile apps
 
Convertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for EnterprisesConvertigo Mobile Application Development platform for Enterprises
Convertigo Mobile Application Development platform for Enterprises
 
DreamFactory Essentials Webinar
DreamFactory Essentials WebinarDreamFactory Essentials Webinar
DreamFactory Essentials Webinar
 
Polysource-IT Profile
Polysource-IT ProfilePolysource-IT Profile
Polysource-IT Profile
 
Polysource-IT Profile
Polysource-IT ProfilePolysource-IT Profile
Polysource-IT Profile
 
Couchbase Mobile on Android
Couchbase Mobile on AndroidCouchbase Mobile on Android
Couchbase Mobile on Android
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
 
Alex Wade, Digital Library Interoperability
Alex Wade, Digital Library InteroperabilityAlex Wade, Digital Library Interoperability
Alex Wade, Digital Library Interoperability
 
Mobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best PracticesMobile and IBM Worklight Best Practices
Mobile and IBM Worklight Best Practices
 

More from TechMaster Vietnam

Go micro framework to build microservices
Go micro framework to build microservicesGo micro framework to build microservices
Go micro framework to build microservicesTechMaster Vietnam
 
Authentication and Authorization
Authentication and AuthorizationAuthentication and Authorization
Authentication and AuthorizationTechMaster Vietnam
 
Postgresql các vấn đề thực tế
Postgresql các vấn đề thực tếPostgresql các vấn đề thực tế
Postgresql các vấn đề thực tếTechMaster Vietnam
 
Chia sẻ kinh nghiệm giảng dạy CNTT
Chia sẻ kinh nghiệm giảng dạy CNTTChia sẻ kinh nghiệm giảng dạy CNTT
Chia sẻ kinh nghiệm giảng dạy CNTTTechMaster Vietnam
 
Cơ sở dữ liệu postgres
Cơ sở dữ liệu postgresCơ sở dữ liệu postgres
Cơ sở dữ liệu postgresTechMaster Vietnam
 
Tìm nền tảng lập trình cho 5 năm tới
Tìm nền tảng lập trình cho 5 năm tớiTìm nền tảng lập trình cho 5 năm tới
Tìm nền tảng lập trình cho 5 năm tớiTechMaster Vietnam
 
Cấu hình Postgresql căn bản trong 20 phút
Cấu hình Postgresql căn bản trong 20 phútCấu hình Postgresql căn bản trong 20 phút
Cấu hình Postgresql căn bản trong 20 phútTechMaster Vietnam
 

More from TechMaster Vietnam (20)

Neural Network from Scratch
Neural Network from ScratchNeural Network from Scratch
Neural Network from Scratch
 
Go micro framework to build microservices
Go micro framework to build microservicesGo micro framework to build microservices
Go micro framework to build microservices
 
Flutter vs React Native 2018
Flutter vs React Native 2018Flutter vs React Native 2018
Flutter vs React Native 2018
 
C đến C++ phần 1
C đến C++ phần 1C đến C++ phần 1
C đến C++ phần 1
 
Control structure in C
Control structure in CControl structure in C
Control structure in C
 
Basic C programming
Basic C programmingBasic C programming
Basic C programming
 
Authentication and Authorization
Authentication and AuthorizationAuthentication and Authorization
Authentication and Authorization
 
Postgresql security
Postgresql securityPostgresql security
Postgresql security
 
Knex Postgresql Migration
Knex Postgresql MigrationKnex Postgresql Migration
Knex Postgresql Migration
 
Postgresql các vấn đề thực tế
Postgresql các vấn đề thực tếPostgresql các vấn đề thực tế
Postgresql các vấn đề thực tế
 
Arrowjs.io
Arrowjs.ioArrowjs.io
Arrowjs.io
 
Minimum Viable Products
Minimum Viable ProductsMinimum Viable Products
Minimum Viable Products
 
Chia sẻ kinh nghiệm giảng dạy CNTT
Chia sẻ kinh nghiệm giảng dạy CNTTChia sẻ kinh nghiệm giảng dạy CNTT
Chia sẻ kinh nghiệm giảng dạy CNTT
 
Cơ sở dữ liệu postgres
Cơ sở dữ liệu postgresCơ sở dữ liệu postgres
Cơ sở dữ liệu postgres
 
Node.js căn bản
Node.js căn bảnNode.js căn bản
Node.js căn bản
 
Tìm nền tảng lập trình cho 5 năm tới
Tìm nền tảng lập trình cho 5 năm tớiTìm nền tảng lập trình cho 5 năm tới
Tìm nền tảng lập trình cho 5 năm tới
 
iOS Master - Detail & TabBar
iOS Master - Detail & TabBariOS Master - Detail & TabBar
iOS Master - Detail & TabBar
 
Phalcon căn bản
Phalcon căn bảnPhalcon căn bản
Phalcon căn bản
 
Cấu hình Postgresql căn bản trong 20 phút
Cấu hình Postgresql căn bản trong 20 phútCấu hình Postgresql căn bản trong 20 phút
Cấu hình Postgresql căn bản trong 20 phút
 
Phalcon introduction
Phalcon introductionPhalcon introduction
Phalcon introduction
 

Recently uploaded

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 

Social Photos - My presentation at Microsoft Tech Day

  • 1. Social Photos How we make it
  • 2. What is Social Photos? • Online social network for photographers and photo lovers. • Take a photo -> share • Like / dislike / commend • Follow other • List photo near current location
  • 4. Social Photos integrates Microsoft and non Microsoft technologies seamlessly http://socialphotos.codeplex.com
  • 5. Step to do #1 • Design a social network – GUI prototyping – Architect design – Database modeling • Web service: from client-server to client- cloud
  • 6. Step to do #2 • Different clients connects to social network – Windows Form / ASP.net – Windows Phone 7.1 – Android / iOS • Web for PC & Mobile: HTML5, CSS3, JavaScript • Visual Studio Light Switch • Q&A
  • 7. Design “social photos” GUI Prototype Architect Database
  • 8. GUI mock up: simple but work 1. Hand sketch on white board 2. Capture by phone camera 3. Write script to explain 4. Email or check-in to collaboration portal
  • 9. GUI mock up: work better See demo
  • 10. Social Photos Database design • 1 photo is owned by 1 user • 1 photo is classified by 0-n categories • 1 user can make 0-n comments on photo.
  • 11. MS SQL Server, DB2, Oracle, MySQL, PostgreSQL, SQ Lite, SAP Sysbase, Informix…
  • 12. Entity Framework: 3 ways to design • Database First: reverse engineer from existing DB. • Model First: visually model tables -> generate DB script • Code First: define class then -> generate DB script
  • 13. Architect: Open, Simple, Efficient Communication Server Protocol ?
  • 14. Architect: Open, Simple, Efficient • Web serviced server • Work well with Entity Framework • Upgrade to Cloud without rewriting client code
  • 15. Problems • Uniform Data Access is hard – Standards exist • ODBC • JDBC • OLEDB • SOAP • WCF Service • Need a multiplatform-supported web service
  • 16. HTTP - Websites (1992) • Support Verbs: CRUD operations – GET: select – PUT: update – POST: insert – DELETE: remove
  • 18. Inside SOAP • XML messages • HTTP Post only
  • 19. RESTful web services (2006) • REST: representational State transfer • Each unique URL is a representation of some objects
  • 20. A RESTful web service
  • 21. OData – Open Data protocol • Open – Based on web standards: HTTP, AtomPub, JSON • Data – For querying and updating data – Different data sources (db, cms, files, etc.) • Protocol – Convention for representing data entities in AtomPub – Query string conventions for addressing and filtering data – Constrained HTTP operations for submitting request
  • 23. Producers SQL Azure SQL Reporting Services SharePoint 2010
  • 24. OData and WCF Data Service
  • 25. • Demo PhotoCloud.svc • Demo using LINQPad to build up query string
  • 26. Demo PhotoClound.svc • Query: GET • Insert : POST – Url: http://localhost/SocialPhotos/PhotoCloud.svc/Categories – Header: User-Agent: Fiddler Content-Type: application/json Content-Type: application/json Host: localhost:88 Content-Length: 17 – Body: {"Name": "New Category"} • Update: PUT – Body: {"Name": "Black and White"} • Delete : DELETE
  • 27. //page size = 2, get 3rd page of top rated (from p in Photos LINQ where p.Likes > 0 orderby p.Likes descending select p).Skip(4).Take(2) http://localhost:88/SocialPhotos/PhotoCloud URI .svc/Photos()?$filter=(cast(Likes,'Edm.Int32')) gt 0&$orderby=Likes desc&$skip=4&$top=2
  • 28. REST OData Essence Pattern, architecture style, Protocol enabling REST or approach Querying capability N/A Y Order returned Have to create custom Y data method Paging returned Have to create custom Y data method
  • 29. SOAP REST Verb POST POST, GET, DELETE, PUT Resource Identification N/A Y Transport protocol HTTP only HTTP, TCP, SMTP, JMS, MQ, BEEP, IIOP Payload format SOAP format POX, JSON Bandwidth Heavier Lighter Use proxy in client side Y N Toolkit required Y N Authorization Depend on app developers Webserver can help (with verbs) Advantages Easy to consume Human Readable Results Easy to build (no toolkit)
  • 30.
  • 31.
  • 33. WCF Data Service - Interceptors // Define a query interceptor for the Orders entity set. [QueryInterceptor("Orders")] public Expression<Func<Order, bool>> OnQueryOrders() Add custom logic to operation or to entity query – Validation – Restriction – Authorization – Logging
  • 34. [QueryInterceptor("Branches")] public Expression<Func<Branch, bool>> OnQueryBranches() { return (o) => o.Address != "Obsolete location"; } [ChangeInterceptor("Customers")] public void OnCustomerAdd(Customer c, UpdateOperations ops) { if (ops == UpdateOperations.Add) { if (c.Name.Trim().Equals(String.Empty)) { throw new DataServiceException(403, "Customer names must not be empty"); } } }
  • 35. CLIENT SIDE DEVELOPMENT Windows Phone 7.1 – Android – iOS – Web Mobile
  • 36. New features in Windows Phone 7.1 • Multi tasking • Back ground agent (back ground audio – transfer) • Access sensors: accelerometer, gyroscope, compass • Silverlight 4 built in • Support socket programming TCP – UDP • Get information of network • Push notification • Live titles
  • 37. New features in Windows Phone 7.1 • Visual Basic support • Advertising SDK • Web Browser control == IE9. Speed & HTML5 • Local database == SQL CE • Isolated storage explorer • Add new launchers and choosers • Allow read only access user’s contacts & calendar • Program camera (raw frame, adjust focus)
  • 38. New features in Windows Phone 7.1 • Scheduler task • Encrypted credential store • Many and many more • ODATA Client !
  • 39. OData for Windows Phone 7.1 URI WCF Data Service HTTP Entity EDM URI OData feed Framework Provider URI
  • 40. OData for Windows Phone 7.1 • DataServiceCollection<T>  Extends ObservableCollection<T>  Automatic change tracking • DataServiceContext  Data querying & updating  Client side change tracking  DataServiceQuery<TEntity> properties
  • 41. OData for Windows Phone 7.1 • DataServiceCollection<T>  LoadAsync(IQueryable<T>) 1. LINQ to DataServiceQuery<T> 2. URI  LoadCompleted event • Optional Handler • Handle errors, perform additional work
  • 43.
  • 44. OData for iOS • http://odataobjc.codeplex.com/ • See video demo
  • 45. WEB FOR MOBILE HTML5, CSS3, JavaScript
  • 46.
  • 47. Native app development pros -cons • Pros: – Performance – Features rich: camera, GPS, accelerometer, compass, calendar, contacts, SMS, … – GUI & usability fine tune • Cons: – Different programming languages: Windows Phone (C#, Visual Basic), Android (Java), iOS (Objective C) – Learning curve & maintaining cost is high
  • 48. 1. HTML 5- CSS3-JavaScript: PhoneGap, jQueryMobile, jQTouch, Sencha Touch,…. 2. Appcelerator’s Titanium Mobile: converts JavaScript to symbolic files then compile to native apps 3. Porting apps: reuse code/ resource , modify code to adapt to each platform.
  • 49.
  • 50. Demo • WebMobile on PC • WebMobile on WindowsPhone • WebMobile on Android
  • 52.
  • 54.
  • 55. Data sources in LightSwitch SQL Server SharePoint 2010
  • 56. LightSwitch Architecture Data Access Middle Tier Client Tier Submit Screens Methods Controls Queries Pipeline Data Workspace Data Workspace
  • 57. The LightSwitch Development Experience Describe your data Author business logic Define custom queries Create screens for Customize screen Create custom common tasks layouts Silverlight controls Integrate with custom Define custom queries data sources
  • 58. Requirements • Visual Studio Pro (or higher) + SP1 • Visual Studio LightSwitch • Optional – Visual Studio SDK: For building VSIX packages – LightSwitch Extension Development Kit (coming soon)
  • 59. LESSON LEARNED IN DEVELOPING MULTIPLATFORM APPLICATIONS
  • 60. • GUI – ARCHITECT- DB • Team Collaboration: Vision, Process, Attitude & Tool • Development Environment • Transparent communication
  • 61.

Editor's Notes

  1. Tạisaochúngtôiluônnhấnmạnhviệcthiếtkếgiaodiệnngườidùngcàng chi tiếtcànggiốngthậtcàngtốt. Trảinghiệmgiaodiệnsẽquyếtđịnhkiếntrúc – côngnghệdựán. Vídụ: khibìnhchúbứcảnhvàcậpnhậttrựctiếptrêntrangthìdẫnđếnphảidùng AJAX. Khimuốnsửaảnhmàkhôngdùng Applet, Flash hay SilverLightnhúngthìchúng ta phảinghĩđến HTML5.Do đó, GUI prototype + simulation càngthậtbaonhiêu, chúng ta sẽgiúpđộipháttriểntránhđilạchướnglan man ở nhữnggiaiđoạncuối.
  2. The Web Application Description Language (WADL) is an XML-based file format that provides a machine-readable description of HTTP-based web applications. These applications are typically REST web serviceshttp://en.wikipedia.org/wiki/Web_Application_Description_Language
  3. MộturlliênquanđếnmộttàinguyênNếu verb khácnhausẽchocáckếtquảtươngtáckhácnhau
  4. REST: communication patternOdata: protocol
  5. GET, PUTPOST:User-Agent: FiddlerContent-Type: application/jsonHost: localhost:88Content-Length:41---{“Name”: “Brandnames”, “Description”: “Famous brandsname such as Windows, iPhone, Ferrari….”}
  6. SOAP use wrapper so it is heavier
  7. Like
  8. Demo by Fiddler 2http://localhost/socialphotos/photocloud.svc/CategoriesUser-Agent: FiddlerHost: localhostAccept: application/jsonhttp://localhost/socialphotos/photocloud.svc/CategoriesUser-Agent: FiddlerHost: localhostAccept: application/atom+xml
  9. The two main classes of the client library are the DataServiceContext class and the DataServiceCollection(Of T) class: DataServiceCollection(Of T) +The DataServiceCollection(Of T) class,which inherits from the ObservableCollection class +The DataServiceCollection(Of T) classrepresents a dynamic data collection that provides notifications when items get added to or removed from the collection. These notifications enable the DataServiceContext to track changes automatically without your having to explicitly call the change tracking methods. DataServiceContext + The DataServiceContext class encapsulates operations that are executed against a specific data service. + However, the DataServiceContext maintains the state of entities on the client between interactions with the data service and in different execution phases of the application. This enables the client to support features such as change tracking and identity management