This document discusses techniques for troubleshooting SharePoint issues using embedded server scripts and C# code without requiring updates to web service packages or DLL installations to the global assembly cache. Some key points discussed include using C# 3.0 features in SharePoint layout pages, generating dynamic methods via reflection to solve inheritance issues, and tools like Camlex that simplify creating CAML queries with lambda expressions and expression trees. Examples are provided for various techniques.
In this slide i try to discuss how to Javascript sourceMaps works behind in details and also discuss in details of Angular compilation process and mode.
It's not about dagger. It's about putting your source code to an Android binary. Yes the compiled dex code! During the presentation I will show in steps how to inject aar to apk without having original source code nor resources.
asp.net is a web development platform, which provides a programming model and various services required to build up robust web application for PC, as well as mobile device.
In this slide i try to discuss how to Javascript sourceMaps works behind in details and also discuss in details of Angular compilation process and mode.
It's not about dagger. It's about putting your source code to an Android binary. Yes the compiled dex code! During the presentation I will show in steps how to inject aar to apk without having original source code nor resources.
asp.net is a web development platform, which provides a programming model and various services required to build up robust web application for PC, as well as mobile device.
C# is a object oriented programming language as well as modern programming Language. It is nothing but extension of C++. Its a simple and general purpose programming language for application development.
Overview of MVC Framework - by software outsourcing company indiaJignesh Aakoliya
This is an overview of MVC Framework for software development - by software outsourcing company India, iFour Technolab Pvt. Ltd. - http://www.ifourtechnolab.com
This month in JavaScript digest:
+ Introduction to GraphQL
+ Turning Design Mockups Into Code With Deep Learning
+ HTML 5.2
+ Why one should [not] use async / await
+ Is jQuery still relevant?
+ 3 reasons to choose Vue over React in 2018
+ Microbundle
+ Webpack 4.0.0-alpha
+ Google shuts down Chrome ‘apps’ section
+ State of JS 2017
Использование деревьев выражений .Net для создания транслятора на языке C#sadomovalex
В лекции рассказано как с помощью деревьев выражений можно создать транслятор, преобразующий код C# в другой язык. Показаны способы создания деревьев выражений, их синтаксический анализ, а также компиляция и исполнение кода. В качестве примера использована библиотека с открытым исходным кодом Camlex, которая использует деревья выражений для трансляции исходного кода в виде лямбда-выражений на языке C# в язык запросов CAML, используемый в платформе Sharepoint. Также освещен обратный процесс преобразования CAML в C# с помощью построения деревьев выражений и кодогенерации.
From Commodore 64 to the Cloud — Lessons from 30 years of programmingSteven Shaw
Lessons about programming, programming languages, distributed systems, and operating systems from the perspective of a professional programmer with 30 years of programming experience.
The lecture by Bjoern Doebel for Summer Systems School'12.
L4Linux, DDEkit, POSIX compatabls
SSS'12 - Education event, organized by ksys labs[1] in 2012, for students interested in system software development and information security.
1. http://ksyslabs.org/
C# is a object oriented programming language as well as modern programming Language. It is nothing but extension of C++. Its a simple and general purpose programming language for application development.
Overview of MVC Framework - by software outsourcing company indiaJignesh Aakoliya
This is an overview of MVC Framework for software development - by software outsourcing company India, iFour Technolab Pvt. Ltd. - http://www.ifourtechnolab.com
This month in JavaScript digest:
+ Introduction to GraphQL
+ Turning Design Mockups Into Code With Deep Learning
+ HTML 5.2
+ Why one should [not] use async / await
+ Is jQuery still relevant?
+ 3 reasons to choose Vue over React in 2018
+ Microbundle
+ Webpack 4.0.0-alpha
+ Google shuts down Chrome ‘apps’ section
+ State of JS 2017
Использование деревьев выражений .Net для создания транслятора на языке C#sadomovalex
В лекции рассказано как с помощью деревьев выражений можно создать транслятор, преобразующий код C# в другой язык. Показаны способы создания деревьев выражений, их синтаксический анализ, а также компиляция и исполнение кода. В качестве примера использована библиотека с открытым исходным кодом Camlex, которая использует деревья выражений для трансляции исходного кода в виде лямбда-выражений на языке C# в язык запросов CAML, используемый в платформе Sharepoint. Также освещен обратный процесс преобразования CAML в C# с помощью построения деревьев выражений и кодогенерации.
From Commodore 64 to the Cloud — Lessons from 30 years of programmingSteven Shaw
Lessons about programming, programming languages, distributed systems, and operating systems from the perspective of a professional programmer with 30 years of programming experience.
The lecture by Bjoern Doebel for Summer Systems School'12.
L4Linux, DDEkit, POSIX compatabls
SSS'12 - Education event, organized by ksys labs[1] in 2012, for students interested in system software development and information security.
1. http://ksyslabs.org/
We are all mostly familiar with just Windows, Linux, Unix (along with all the Unix derives) and Mac OS as the primary Operating Systems available. There is a whole collection of operating systems out there, ranging from the amateur hobbyist's take on conquering the OS world to full blown systems which either found a niche market or got doomed to oblivion. I shall attempt to present a small sample from this varied and interesting set.
From the Un-Distinguished Lecture Series (http://ws.cs.ubc.ca/~udls/). The talk was given Feb. 9, 2007
Learn how to develop an AndroidApp from a senior developer — for free! We decided to make one of our “Showmaxers teaching Showmaxers” events public. This one is from our Android developer Michal Ursiny. Check it out.
What you will learn and do:
- Introduction to Android development and what it takes to develop for Android - it’s actually pretty easy to start compared to other mobile platforms
- Java vs Kotlin - you can use both, but we recommend Kotlin
- How to create new project using Android Studio, the official IDE for Android development
- How to choose the appropriate minimum SDK version
- Understanding basic project structure:
sources
resources
AndroidManifest.xml
build.gradle
- You will run the demo project generated by Android Studio and modify it
- The basic building blocks:
Activity
Fragment
View
- How to build basic layouts using resources and themes
- The challenges - lifecycles and why to use viewmodels
- Permissions - how to access REST APIs using Retrofit library and why using third party image libraries is a good idea
Getting started
Download Android Studio - the official IDE based on IntelliJ IDEA. Configure your emulator or enable developer mode on your device and connect to the computer. Get acquainted with Android Studio.
Originally, the sample project used within the tutorial was targeting our internal Showmax Search API. It was changed to use GitHub Users Search API so it’s available and useful for everyone.
On our blog on https://tech.showmax.com/2021/02/android-crashcourse/ you can watch Michal’s easy-to-digest and comprehensive presentation embedded from YouTube.
Or just read the deck and learn the basics.
Try building the app yourself by following the shared sample project: https://github.com/Showmax/GithubUsersSearch
Monorail presentation at WebDevelopersCommunity, Feb 1, 2009ken.egozi
A presentation describing Castle Monorail, the MVC framework for ASP.NET from Castle project.
Given at Microsoft offices in Ra'anana, Israel, on Feb 2nd, 2009, for the Web Developers Community (WDC), by Ken Egozi, project lead of Monorail
Lecture on CodeIgniter, # OSS Essential Training Program at Chittagong University of Engineering Technology, February 2008, http://bdosdn.org/wsatcuet.php
2. Efficient way to troubleshoot issues, which are not
reproduced on dev environment
Page is opened in context of living site, e.g.
http://example.com/_layouts/test.aspx
Do not require updates of wsp packages
Do not require installations of dlls into the GAC
Can be easily removed from production after
troubleshooting without leaving security holes
C# 2.0 is available by default for server scripts
3. Example: trace info about thread principal and
currently logged Sharepoint user
4. Example: trace info about thread principal and
currently logged Sharepoint user
5. Enable features of C# 3.0 in _layouts pages via
web.config:
All features of C# 3.0 become available (e.g. lambdas,
query expressions, etc.): see Overview of C# 3.0
6. Sharepoint 2013 preview:
Web sites are created with .Net 4.0 app pools
Default compiler is set to version 4.0
It is possible to use features of C# 4 (e.g. dynamic types) in
embedded server scripts without additional configurations
7. Use when can’t solve problem with standard tools
Requires preliminary investigation of Sharepoint code:
JetBrains dotPeek
Telerik JustCompile
Reflector
Where to search Sharepoint dlls:
GAC
14/ISAPI
inetpub...mywebapp_app_bin
8. Real life example:
Create instance of SPSite in
SPSecurity.RunWithElevatedPrivileges() method
Open SPWeb
Code is executed under SHAREPOINTSystem account (app pool
identity)
Call standard API which in turns uses SPContext.Current.Site or
SPContext.Current.Web
Result: access denied page
13. Can be used for generating and executing a method at run time,
without having to generate a dynamic assembly and a dynamic type
to contain the method
The executable code created by the just-in-time (JIT) compiler is
reclaimed when the DynamicMethod object is reclaimed
If the dynamic method is associated with specific type, it has access to
all members of the type, regardless of access level
Dynamic methods and their parameters do not have to be named
Allows to avoid some limitations of C#: e.g. although dynamic
methods are static methods the relaxed rules for delegate binding
allow a dynamic method to be bound to an object, so that it acts like an
instance method when called using that delegate instance
14. Example: dynamic method for calculating factorial
15. How it can be used in Sharepoint?
Example: use Telerik RadEditor in all sub sites in web application
without feature activations
RadEditorFeature – overrides rendering template for RichTextField with
Telerik control
RadEditorFeatureIE – “flag” feature, depends on RadEditorFeature
Technically it is enough to activate RadEditorFeature once
For new sites:
Activate features manually
Use feature stappling for OTB site definitions
Modify onet.xml file for custom site definitions
16. Where problem is coming from? RadHtmlListField class:
17. Solution:
Define new class inheritor of RadHtmlListField
Define OnLoad() by the same way as in RadHtmlListField using reflection
Always return true from ShowEditorOnPage() method
Inheritance chain:
AllBrowsersHtmlListField –> RadHtmlListField –> MOSSRadEditor
The problem: how to call MOSSRadEditor.OnLoad() from
AllBrowsersHtmlListField.OnLoad() without caling RadHtmlListField
.OnLoad()?
I.e. we need to skip one tier in the inheritance chain and call virtual method OnLoad(),
but not from base class, but from base of base class
Answer: no how in standard C#
Can dynamic method help here? Yes
18. Example: create dynamic method for skipping one tier in virtual members calls
19. Camlex – open source project which simplifies creating of CAML queries for
SharePoint by using expression trees
Uses expression trees and lambda expressions for generating CAML
Simplifies creation of dynamic CAML queries when conditions are calculated
in runtime
Doesn’t require knowledge of CAML from developers
Supports native .Net types and Sharepoint-specific types
http://camlex.codeplex.com/
21. Camlex 3.0 Reverse Engineering – creates expression trees based on strings
Reverse Engineering translator:
22. Camlex Re + ExpressionToCode = Camlex Online: http://camlex-online.org/
Simplifies usage of Camlex for developers who didn’t have experience with it
yet
Quick refactoring of existing hard-coded CAML queries to Camlex
Fully reversible CAML query schema opens many interesting applications in
future
Example of combining of several non-trivial OSS projects
23. Add conditions to existing string queries using lambda expressions:
25. Built-in to OS, doesn’t need VS for writing and running C# programs
May be useful:
if you already have a code which want to reuse
have existing C# code which is hard to move to PowerShell
for developers who know C#, but only started work with PowerShell
if you want to run quick test, but don’t want to run VS and compile dll
C# 3.0 can be used: -Language CSharpVersion3
Can specify existing assemblies or source code files
26. Example: enumerate sub-sites using C# code in PowerShell
27. http://sadomovalex.blogspot.com/
Use C# 3.0 features in application layout pages in Sharepoint:
http://sadomovalex.blogspot.fi/2010/12/use-c-30-features-in-
application-layout.html
Use Telerik Rad Editor Lite without features activation:
http://sadomovalex.blogspot.fi/2011/12/use-telerik-rad-editor-lite-
without.html
Generating Dynamic Methods with Expression Trees in Visual Studio
2010:
http://blogs.msdn.com/b/csharpfaq/archive/2009/09/14/generating-
dynamic-methods-with-expression-trees-in-visual-studio-2010.aspx
Camlex project site: http://camlex.codeplex.com/
Camlex online: http://camlex-online.org/
ExpressionToCode: http://code.google.com/p/expressiontocode/
Materials from followings sites are used for presentation:
http://newswallpapers1.blogspot.com, http://arts-wallpapers.com,
http://www.fanpop.com, http://wallpaperswide.com,
http://starwars.wikia.com