Developers often don't pay attention to code portability until they need to target multiple platforms. However, large amount of non-portable code often hints about violation of clean code principles, so it is worth investigating which part of the source code base are platform-specific and for what reasons.
In this session we will give an overview of portable class libraries, show how to extract PCL components from a real-world application and go through typical challenges that are faced when writing portable code. We will present the original tool that analyzes assemblies for portability compliance and can be used as a guard to prevent mixing business logic with infrastructure-specific functionality. Finally we will demonstrate how PCLs help targeting platforms such as Windows Store, Android and iOS.
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...Jean Vanderdonckt
In this paper we present an extensible software workbench for supporting the effective and dynamic prototyping of multimodal interactive systems. We hypothesize the construction of such applications to be based on the assembly of several components, namely various and sometimes interchangeable modalities at the input, fusion-fission components, and also several modalities at the output. Successful realization of advanced interactions can benefit from early prototyping and the iterative implementation of design requires the easy integration, combination, replacement, or upgrade of components. We have designed and implemented a thin integration platform able to manage these key elements, and thus provide the research community a tool to bridge the gap of the current support for multimodal applications implementation. The platform is included within a workbench offering visual editors, non-intrusive tools, components and techniques to assemble various modalities provided in different implementation technologies, while keeping a high level of performance of the integrated system.
A quick look at the best PHP Frameworks.
- Why are Frameworks useful?
- What are PHP Frameworks?
- Why do developers prefer Frameworks?
- Structure/ MVC model
- CakePHP Vs Zend Framework 2 Vs CodeIgniter Vs Yii
EKON20 Conference, November 2016
Monolithic rich Windows applications are not enough for our customers. We are often requested to provide a web front-end, or a REST server to be consumed by mobile or thin clients. Integrating n-Tier architecture to an existing project is challenging. Some good practices, based on industry standards and proven design patterns (like uncoupling or SOLID) can be mind-breaker for RAD developers. In this session, we will define some architectural aspects of SOA, ORM and MVC/MVVM, and what our Open Source mORMot framework offers to ease this transition.
Introduction to Hibernate. This is a teaser for the hibernate framework.
It contains basics for using hibernate. Beginners, Freshers should go through the slides for getting an introduction to hibernate
An Open Source Workbench for Prototyping Multimodal Interactions Based on Off...Jean Vanderdonckt
In this paper we present an extensible software workbench for supporting the effective and dynamic prototyping of multimodal interactive systems. We hypothesize the construction of such applications to be based on the assembly of several components, namely various and sometimes interchangeable modalities at the input, fusion-fission components, and also several modalities at the output. Successful realization of advanced interactions can benefit from early prototyping and the iterative implementation of design requires the easy integration, combination, replacement, or upgrade of components. We have designed and implemented a thin integration platform able to manage these key elements, and thus provide the research community a tool to bridge the gap of the current support for multimodal applications implementation. The platform is included within a workbench offering visual editors, non-intrusive tools, components and techniques to assemble various modalities provided in different implementation technologies, while keeping a high level of performance of the integrated system.
A quick look at the best PHP Frameworks.
- Why are Frameworks useful?
- What are PHP Frameworks?
- Why do developers prefer Frameworks?
- Structure/ MVC model
- CakePHP Vs Zend Framework 2 Vs CodeIgniter Vs Yii
EKON20 Conference, November 2016
Monolithic rich Windows applications are not enough for our customers. We are often requested to provide a web front-end, or a REST server to be consumed by mobile or thin clients. Integrating n-Tier architecture to an existing project is challenging. Some good practices, based on industry standards and proven design patterns (like uncoupling or SOLID) can be mind-breaker for RAD developers. In this session, we will define some architectural aspects of SOA, ORM and MVC/MVVM, and what our Open Source mORMot framework offers to ease this transition.
Introduction to Hibernate. This is a teaser for the hibernate framework.
It contains basics for using hibernate. Beginners, Freshers should go through the slides for getting an introduction to hibernate
A talk about the innovation of WebLogic Server, held at the Oracle Groundbreakers Tour APAC 2020 https://oracle-groundbreakers-apac-virtual-tour-2020.heysummit.com/speakers/michel-schildmeijer/
Dirigible powered by Orion for Cloud Development (EclipseCon EU 2015)Nedelcho Delchev
This BoF is focused on one of the development models "In-System Programming", that can be used in combination with cloud platforms. It leverages also content-centric architectural style by using centralised repository, dynamic languages and multi-container runtime.
The main goal is achieving the shortest development turn-around time ever.
Guillaume Laforge, Product Ninja & Advocate at Restlet and Chair of the Apache Groovy PMC, presented about how to use Groovy for developing and consuming REST Web APIs at the JavaOne 2015 conference
SOLID principles should better be applied when designing business objects, as soon as maintainability and modularity are needed. They bring uncoupling, abstraction and clean design to Object Oriented Programming. Microservices could be seen as SOLID principles applied to the Service Oriented Architecture. In respect to a classical monolith server, thanks to uncoupling and better granularity, you may enhance deployment, ease cooperation between dev teams, introduce Domain Driven Design and/or Event Driven Design, scale horizontally and still incorporate existing code and services.
After a quick and practical review of SOLID principles, we will see how they may apply to SOA, and how Microservices could be defined using the Open Source mORMot framework interface-based services, on Windows or Linux.
F# in Action: Playing Functional Conway's Game of LifeVagif Abilov
F# in action: playing functional Conway's game of life
John Conway's game of life has become a playground for programmers using different languages and platforms. It inspired many coding dojos and code retreats because it touches various aspects of development from component design to performance testing.
In this session we are going to take functional approach and play different variations of Conway's game of life using F#. The session starts with presentation of a traditional game implementation in C#, so we can later compare it with F# versions. Switching to F#, we will first write an implementation for a standard two-dimensional board, and then extend it to support asynchronous workflows, parallel tasks and even boards of arbitrary dimensions. Each implementation will be complemented with a set of tests using FsUnit framework, and graphical presentation of results will use Microsoft Chart Controls.
iSeries Modernization: RPG/400 to Java Migrationecubemarketing
eCube provides modernization, integration, replatforming and web-facing solutions that will extend the ROI of your RPG application. Learn more about eCube's transformation process for legacy RPG applications. http://ecubesystems.com/iseries.html
MVC 6 - the new unified Web programming modelAlex Thissen
Presentation for Dutch Microsoft TechDays 2015:
With ASP.NET 5 comes MVC 6 with a programming model that unifies Web Pages, MVC and Web API. Each of these has been rebuilt to reflect Microsoft's vision of lean and composable web applications. In this session you will see the changes that have been made to the programming model. We will cover topics such as the new POCO controllers, View Components, dependency injection and much more. Plus, you are going to see the significant changes to the ASP.NET runtime on which MVC 6 is built.
A talk about the innovation of WebLogic Server, held at the Oracle Groundbreakers Tour APAC 2020 https://oracle-groundbreakers-apac-virtual-tour-2020.heysummit.com/speakers/michel-schildmeijer/
Dirigible powered by Orion for Cloud Development (EclipseCon EU 2015)Nedelcho Delchev
This BoF is focused on one of the development models "In-System Programming", that can be used in combination with cloud platforms. It leverages also content-centric architectural style by using centralised repository, dynamic languages and multi-container runtime.
The main goal is achieving the shortest development turn-around time ever.
Guillaume Laforge, Product Ninja & Advocate at Restlet and Chair of the Apache Groovy PMC, presented about how to use Groovy for developing and consuming REST Web APIs at the JavaOne 2015 conference
SOLID principles should better be applied when designing business objects, as soon as maintainability and modularity are needed. They bring uncoupling, abstraction and clean design to Object Oriented Programming. Microservices could be seen as SOLID principles applied to the Service Oriented Architecture. In respect to a classical monolith server, thanks to uncoupling and better granularity, you may enhance deployment, ease cooperation between dev teams, introduce Domain Driven Design and/or Event Driven Design, scale horizontally and still incorporate existing code and services.
After a quick and practical review of SOLID principles, we will see how they may apply to SOA, and how Microservices could be defined using the Open Source mORMot framework interface-based services, on Windows or Linux.
F# in Action: Playing Functional Conway's Game of LifeVagif Abilov
F# in action: playing functional Conway's game of life
John Conway's game of life has become a playground for programmers using different languages and platforms. It inspired many coding dojos and code retreats because it touches various aspects of development from component design to performance testing.
In this session we are going to take functional approach and play different variations of Conway's game of life using F#. The session starts with presentation of a traditional game implementation in C#, so we can later compare it with F# versions. Switching to F#, we will first write an implementation for a standard two-dimensional board, and then extend it to support asynchronous workflows, parallel tasks and even boards of arbitrary dimensions. Each implementation will be complemented with a set of tests using FsUnit framework, and graphical presentation of results will use Microsoft Chart Controls.
iSeries Modernization: RPG/400 to Java Migrationecubemarketing
eCube provides modernization, integration, replatforming and web-facing solutions that will extend the ROI of your RPG application. Learn more about eCube's transformation process for legacy RPG applications. http://ecubesystems.com/iseries.html
MVC 6 - the new unified Web programming modelAlex Thissen
Presentation for Dutch Microsoft TechDays 2015:
With ASP.NET 5 comes MVC 6 with a programming model that unifies Web Pages, MVC and Web API. Each of these has been rebuilt to reflect Microsoft's vision of lean and composable web applications. In this session you will see the changes that have been made to the programming model. We will cover topics such as the new POCO controllers, View Components, dependency injection and much more. Plus, you are going to see the significant changes to the ASP.NET runtime on which MVC 6 is built.
Presentation for Stichting DotNed in 2015:
Microsoft neemt ASP.NET op de schop. Het web applicatie framework uit .NET 1.0 wordt grotendeels herschreven om te voldoen aan de eisen die men tegenwoordig stelt aan het realiseren van een moderne web applicatie. Deze sessie kijken we naar de nieuwe opzet van ASP.NET. We zien hoe Microsoft daarmee een cloud geoptimaliseerd, cross-platform framework creeert, dat zij zelf sneller kunnen laten evolueren door kortere release cycles. Dit alles betekent wel dat ASP.NET anders is geworden. In deze sessie leer je daarom ook wat er is veranderd, hoe je aan de slag gaat en waarom ASP.NET vNext een revolutionaire stap is in Microsoft's framework.
An introduction to {code} by Dell EMC, our mission on containers, and our core project REX-Ray. This will give the audience an understanding of why REX-Ray is important and where you can go to learn more.
Current & Future Use-Cases of OpenDaylightabhijit2511
OpenDaylight Overview and Architecture
• OpenDaylight Use Cases (Partial List)
I. Network Abstraction
II. ONAP
III. Network Virtualization
IV. AI/ML with OpenDaylight
V. ODL in OSS
• OpenDaylight: Getting Involved
The Cordova framework
Recurrent app architecture
Cordova CLI
Debugging Cordova applications
My development environment
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2015.
http://www.ivanomalavolta.com
Dive into the new open source, modular and cross platform web framework. Introductory session that covers architecture, CLI tooling, basic CLI commands and exploring .csproj and Startup middleware and service.
Dot net Online Training | .Net Training and Placement onlineGaruda Trainings
The .NET Framework is a software framework, developed by Microsoft that was primarily intended to run on Windows operating system. Microsoft started developing it since late 1990’s and its first beta version was released in the end of 2000, however its first commercial version was released in the year of 2002. Wide genres of applications can be developed using .NET framework and it is hugely popular in the IT market currently.
P2Cinfotech is one of the leading, Online IT Training facilities and Job Consultant, spread all over the world. We have successfully conducted online classes on various Software Technologies that are currently in Demand. To name a few, we provide quality online training for QA, QTP, Manual Testing, HP LoadRunner, BA, Java Technologies.
Unique Features of P2Cinfotech:
1. All online software Training Batches will Be handled by Real time working Professionals only.
2. Live online training like Real time face to face, Instructor ? student interaction.
3. Good online training virtual class room environment.
4. Special Exercises and Assignments to make you self-confident on your course subject.
5. Interactive Sessions to update students with latest Developments on the particular course.
6. Flexible Batch Timings and proper timetable.
7. Affordable, decent and Flexible fee structure.
8. Extended Technical assistance even after completion of the course.
9. 100% Job Assistance and Guidance.
Courses What we cover:
Quality Assurance
Business Analsis
QTp
JAVA
Apps Devlepoment Training
Register for Free DEMO:
www.p2cinfotech.com p2cinfotech@gmail.com +1-732-546-3607 (USA)
{code} and Containers - Open Source Infrastructure within Dell TechnologiesThe {code} Team
Learn how The {code} Team is building new infrastructure possibilities for persistent storage in all the major container ecosystems such as Kubernetes, Docker, and Mesos with native integrations and contributing the Container Storage Interface
Building RESTfull Data Services with WebAPIGert Drapers
Data services are a major building block inside a service oriented architecture. Not only do they provide the abstraction and isolation between physical storage systems and the business layer, they can also provide the means for: authentication, authorization, transformation, projection, scale (through for example sharding) and caching. This session will walk you through implementing your RESTfull data service so that you can easily enable and integrate the described capabilities
Microsoft is working hard to modernize the .NET Platform. There are great new frameworks and tools coming, such as .NET Core and ASP.NET Core. The amount of new things is overwhelming, with multiple .NET Platforms (.NET Framework, Unified Windows Platform, .NET Core), multiple runtimes (CoreCLR, CLR, CoreRT), multiple compilers (Roslyn, RyuJIT, .NET Native and LLILC) and much more. This session will bring you up to speed on all this new Microsoft technology, focusing on .NET Core.
But, we will also take a look at the first framework implementation on top op .NET Core for the Web: ASP.NET Core 1.0. You will learn about ASP.NET Core 1.0 and how it is different from ASP.NET 4.6. This will include Visual Studio 2015 support, cross-platform ASP.NET Core and command-line tooling for working with ASP.NET Core and .NET Core projects.
After this session you know where Microsoft is heading in the near future. Be prepared for a new .NET Platform.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Designing for Privacy in Amazon Web ServicesKrzysztofKkol1
Data privacy is one of the most critical issues that businesses face. This presentation shares insights on the principles and best practices for ensuring the resilience and security of your workload.
Drawing on a real-life project from the HR industry, the various challenges will be demonstrated: data protection, self-healing, business continuity, security, and transparency of data processing. This systematized approach allowed to create a secure AWS cloud infrastructure that not only met strict compliance rules but also exceeded the client's expectations.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
Tim Combridge from Sensible Giraffe and Salesforce Ben presents some important tips that all developers should know when dealing with Flows in Salesforce.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Why React Native as a Strategic Advantage for Startup Innovation.pdfayushiqss
Do you know that React Native is being increasingly adopted by startups as well as big companies in the mobile app development industry? Big names like Facebook, Instagram, and Pinterest have already integrated this robust open-source framework.
In fact, according to a report by Statista, the number of React Native developers has been steadily increasing over the years, reaching an estimated 1.9 million by the end of 2024. This means that the demand for this framework in the job market has been growing making it a valuable skill.
But what makes React Native so popular for mobile application development? It offers excellent cross-platform capabilities among other benefits. This way, with React Native, developers can write code once and run it on both iOS and Android devices thus saving time and resources leading to shorter development cycles hence faster time-to-market for your app.
Let’s take the example of a startup, which wanted to release their app on both iOS and Android at once. Through the use of React Native they managed to create an app and bring it into the market within a very short period. This helped them gain an advantage over their competitors because they had access to a large user base who were able to generate revenue quickly for them.
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Hivelance Technology
Cryptocurrency trading bots are computer programs designed to automate buying, selling, and managing cryptocurrency transactions. These bots utilize advanced algorithms and machine learning techniques to analyze market data, identify trading opportunities, and execute trades on behalf of their users. By automating the decision-making process, crypto trading bots can react to market changes faster than human traders
Hivelance, a leading provider of cryptocurrency trading bot development services, stands out as the premier choice for crypto traders and developers. Hivelance boasts a team of seasoned cryptocurrency experts and software engineers who deeply understand the crypto market and the latest trends in automated trading, Hivelance leverages the latest technologies and tools in the industry, including advanced AI and machine learning algorithms, to create highly efficient and adaptable crypto trading bots
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
2. About myself
• Mail: vagif.abilov@gmail.com
• Twitter: @ooobject
• GitHub: object
• BitBucket: object
• Blog: http://bloggingabout.net/blogs/vagif/default.aspx
• Some articles: http://www.codeproject.com
• Some open source projects:
– Simple.Data OData adapter
– Simple.OData.Client
– MongOData
– PCL Conformance Analyzer
3. Poll: do you care about PCL?
• Are you familiar with the concept of PCL?
• Have you used portable class libraries?
• Have you built your own portable class libraries?
• Do you maintain source code for applications that need
to be deployed on multiple platforms?
4. By the way, what is «portability»?
According to Wikipedia:
Portability in high-level computer programming is the
usability of the same software in different environments.
Strategies for portability
• Transferring installed program files to another computer of basically
the same architecture.
• Reinstalling a program from distribution files on another computer of
basically the same architecture.
• Building executable programs for different platforms from source
code; this is what is usually understood by "porting".
5. Portabilitity definition (cont’d)
Achieving portability between different processors,
according to Wikipedia:
• Non-web programs, installed upon a computer in the
normal manner, can have more control, and yet achieve
system portability by linking to the Java package.
• Software can be recompiled and linked from source
code for different operating systems and processors if
written in a programming language supporting
compilation for the platforms.
6. Innovative portability strategies
• Xamarin products: compiling to native apps
– Binding Objective-C libraries (iOS)
– Binding Java libraries (Android)
• Portable class libraries: managed assemblies that work
on more than one .NET Framework platform
– .NET 4.0, 4.0.3, 4.5
– Silverlight 4, 5
– Windows Phone 7, 7.5, 8
– .NET for Windows Store applications
– Xbox 360
7. Recompilation vs. binary reuse
Does it really matter if we package code in
reusable assemblies? Can we compile our
code for a new target platform when we
actually need it?
8. PCL advantages
• If the code is not bound to a specific platform, then
packaging it in a portable class library will guard it from
unintended platform dependencies by enforcing
portability constraints at early development stage
• Packaging code as PCL may require introduction of
higher level abstractions, extraction of interfaces,
inversion of dependencies and provide guidance to
follow SOLID principles
11. Case study
From
Simple.Data OData adapter
to
Simple.OData.Client PCL
12. What is Simple.Data
• A lightweight, dynamic data access component for
.NET
• Written and maintained by Mark Rendle
• Adapters for SQL Server, Oracle, Sqlite, MongoDB,
OData, Oracle, PostgreSql, Informix
• An alternative to ORM libraries, such as Entity
Framework and NHibernate
13. Simple.Data code example
var db = Database.Open();
var titles = db.Albums
.All()
.Select(db.Albums.Title)
.Where(db.Albums.GenreId == 1 &&
db.Albums.AlbumId > 400);
14. Simple.Data OData adapter
• An alternative to WCF DataServices client
• Better fits RESTful nature of OData protocol than SOAP
alike client code generation triggered with «Add Service
Reference»
15. Simple.Data.OData code example
var db = Database.Opener.Open(
"http://packages.nuget.org/v1/FeedService.svc/");
var package1 = db.Packages
.FindByTitle("Simple.Data.OData");
var package2 = db.Packages
.Find(db.Packages.Title == "Simple.OData.Client");
Generate HTTP GET request URLs:
Packages?$filter=Title+eq+%27Simple.Data.OData%27
Packages?$filter=Title+eq+%27Simple.OData.Client%27
16. Adapter
• Structural design pattern
• Converts the interface of a class into another interface
clients expect
Common API
Adapter
External service
19. Making the adapter portable
• An adapter can target new platforms as long as it
provides a bridge between interfaces (and interfaces
don’t refer to types bound to specific platforms)
• OData protocol is platform agnostic
• Most of OData adapter code deals with either parsing
XML documents returned by an OData service or
formatting CLR objects as XML documents to send to
OData service
• Simple.Data API uses types defined in Simple.Data
library
• Simple.Data supports Mono (hope of portability with
other platforms)
23. Simple.Data.OData version >= 0.6
Simple.Data API
Simple.Data OData Adapter
Simple.OData.Client PCL
OData protocol
24. Simple.OData.Client
• Version 0.13
– .NET 4.0, .NET 4.0.3, 4.5
– Windows Store
– Silverlight 5
– Windows Phone 8
• Version 0.17
– Xamarin.Android
– Xamarin.iOS
25. But what about SOLID principles?
Example
Adding support for authentication
26. User request: support authentication
• First implementation: accept user credentials (user +
password), create authentication object using one of
supported schemes (Basic, Windows etc.)
• Worked like a charm, easy to use in client code
var odataFeed = new ODataFeed(
"http://www.myservice.com/api",
"Vagif",
"Password123");
• At that time Simple.Data OData adapter included non-portable
version of Simple.OData.Client
27. ODataFeed
public class ODataFeed
{
public string Url { get; set; }
public string User { get; set; }
public string Password { get; set; }
public string Domain { get; set; }
public bool IntegratedSecurity { get; set; }
}
28. Creating Web request
var request = (HttpWebRequest)WebRequest.Create(uri);
if (this.Credentials.IntegratedSecurity)
{
request.Credentials = CredentialCache.DefaultNetworkCredentials;
}
else if (!string.IsNullOrEmpty(this.Credentials.User))
{
request.Credentials = new NetworkCredential(
this.Credentials.User,
this.Credentials.Password,
this.Credentials.Domain);
}
29. Merging with Portable branch
Project doesn’t compile!
• System.Net.CredentialCache: .NET 4.x only
• System.Net.NetworkCredential: most of platforms
30. What went wrong?
• Simple.Data OData adapter took responsibility to create
user credentials based on sensitive user information
• Leaving aside security aspects, the adapter violated
single responsibility principle
• The adapter restricted supported authentication metods
to those provided by credential creation code
• The adapter is not open to extending it with new
authentication methods, so it violated open/closed
principle too
• Use of interface segregation principle would avoid this
mistake
• PCL compliance forced use of interfaces
31. Revised implementation
In platform-spefic client code
var odataFeed = new ODataFeed(
"http://www.myservice.com/api",
credentials);
In Simple.OData.Client PCL
var request = (HttpWebRequest)WebRequest.Create(uri);
request.Credentials = this.Credentials;
32. Revised implementation
• Credentials is an instance of a class that implements
System.Net.ICredentials interface
• Neither Simple.Data OData adapter (.NET 4.x) nor
Simple.OData.Client refer to a specific authentication
scheme
• All present and future authentication schemes are
supported as long as they conform ICredentials
33. Observations
• Some SOLID principles require coding discipline and
leave a room for interpretation, IMHO especially SRP
and OCP (John Skeet on OCP: «While I've obviously considered the
possibility that I'm the only one who finds it confusing, I've heard enough variation in
the explanations of it to suggest that I'm really not the only one»)
• PCL conformance requirement doesn’t release you
from the responsibility to make the design decision, but
it can guard you from making obvious mistakes and
sometimes even guide you in a right direction
• PCLs make you more carefully plan service
instantiation and use of non-functional utilities (logging,
instrumentation etc.)
34. PCLs and concrete classes
• Portable class libraries do not push the work of
implementing platform-specific services to client
applications
• PCLs can be packaged as a single portable deployment
unit
– Autofac
– Json.NET
– Simple.OData.Client
• PCLs can also be compound, consisting of core
portable and platform-specific parts
– MetroLog
– Splat
37. PCLs consuming PCLs
• A PCL client can also be a portable library
• Client target platforms must be a subset of the
referenced PCL’s target platforms
• Functionality that requires platform-specific services is
usually referred using interfaces and abstract classes
• There is a trick to use concrete platform-specific
classes in client PCLs by placing in the referenced PCL
a dummy class with the same API surface and
assembly identity as the platform-specific class
38. PCL profiles and portable subsets
• Profile is a set of supported platforms
• Portable subset is a family of profiles that expose
certain version of .NET FX API surface area
– Profile 78: Portable Subset:
• .NET 4.5
• Windows Phone 8
• Windows Store
– Profile 95: Portable Subset (Legacy):
• .NET 4.0.3 and higher
• Silverlight 4 and higher
• Windows Phone 7 and higher
• Windows Store
39. PCLs for Android and iOS
Demo: Xamarin .NET Mobility Scanner
Example: Reflection API portability
40. Polyglot programming with PCLs
• Use right language to solve specific problems
• C# provides the best ‘one size fits all’ choice
• F# is very efficient for immutable data transformations,
financial computations, machine learning
• F# code can be packaged in a PCL and shared among
different platforms (inluding Android and iOS!)
– No official support to target Windows Phone 8 using F# PCL, but there
is a workaround
– Both PCL and F# support in Xamarin are work in progress (with
changes being made literally while I am speaking now)
• Core logic can be written in C# and F# and packaged
as PCL, and UI is added using platform-specific tools
41. PCLs for the future
• Profiles for v.4.0 API surface are being deprecated
• Visual Studio 2013 can open PCLs that target legacy
platforms, but it will upgrade Silverlight to target version
5 and Windows Phone to target version 8
• Xamarin PCLs targets both v.4.0 and v.4.5 API surfaces
• If a library target wide range of platforms (both 4.0 and
4.5), its NuGet package should include separate binaries
for each surface
• Consider only targeting v.4.5 API surface for new
projects unless you need to support legacy platforms
42. Using PCLs in UI
• Use of portable class libraries can result in significant
code reuse in cross-platform application development
• Most popular approach to cross-platform UI with PCLs
is to use MVVM pattern and package core services,
models and view models in a portable library
• Most popular MVVM frameworks that have PCLs are
MvvmLights and MvvmCross
• MvvmCross supports targeting Xamarin.iOS and
Xamarin.Android (and provides phenomenal support at
StackOverflow by @slodge)
43. Example: Lions Roar
• Developed by Sequence Agency
• UI is built using MvvmCross
• View models PCL (2463 LOC)
• Entities PCL (691 LOC)
• Supported plalforms
– Windows Store (1166 LOC)
– Windows Phone 8 (668)
– Android Phone/Tablet (1172)
– iPhone/iPad (2000 LOC)
44. Using PCL in ODataPad UI
• ODataPad views show images
• Original view model design included core portable base
view model (without image data) and platform-specific
view models (with image data)
• Small picture size makes possible storing images in
base64 format and reuse a single view model in all
platforms
• Rendering images requires platform-specific value
converters
• A PCL with a design-time view model serves design
data to all Visual Studio designers (Blend)
45. Conclusion
• Portable class libraries are not only for binary reuse
• Packaging code as PCLs helps making code cleaner:
– Extract interfaces
– Unify platform-specific services
– Inject service dependencies
– Use portable data structures
• Consider PCLs when choosing third party libraries
– Ready for other platforms
– Indication of a proper design
– May only have dependencies to other portable libraries
• Consider make your next library portable even if you
only target a single platform!
46. Resources
• Daniel Plaisted «How to Make Portable Class Libraries
Work for You»
• Scott Hanselman «Cross-Platform Portable Class
Libraries with .NET are Happening»
Open source projects at GitHub:
• AutoFac
• MetroLog
• Splat
• MvvmCross
• Simple.OData.Client
47. Thank you!
• Mail: vagif.abilov@gmail.com
• Twitter: @ooobject
• GitHub: object
• BitBucket: object
• Blog: http://bloggingabout.net/blogs/vagif/default.aspx
The source code for this PCL Conformance Analyzer can
be found at https://github.com/object/PclAnalyzer