Title: MONO
1MONO ???????? ????????????? ?? .NET Framework
????? ??????? ???????? ?? ?????????? ?
??????????? ?? ?? "??. ??????? ????????"
2?? ?????????????
- ????? ?? ?????????? ??????????? ? ?? ???????? ?
???????????? MONO - ?????????? ??????
- ??????????? ???????? ?? ??????
- ?????? ???????? ?? ????? C
- ?? ?????????? ??????????? ?? ??????????? ?
????????? ???????? ??????? - OpenOffice.org
3??????????
- ???????? ?? ?? Microsoft ??????????????? ?? .NET
- ???????? Mono
- ?????? ?? ???????
- ?????????? ??????????? ???????
- ??????????? ? ????????????? ?? Mono ??? Linux
- ???????????? ?? C
- ??????????? ??????
- ???????? ?????????? ? Mono
- Windows Forms
4?????????? (2)
- ???????? ?????????? ? Mono
- GTK
- Gnome
- Cococa ?? MAC OS
- Glade
- ?????????????? Monodoc
- ????? ?? ??????????
- MonoDevelop
- Eclipse
- ADO.NET ??? Mono
5?????????? (3)
- Java ?? ??? .NET CLR
- ASP.NET ??? Mono
- ??????? mod_mono
- ???????? XSP
- Mono ??????? ? Mono
- Mono ??? ??? ?? ??
- Mono ???????
- Mono ??????? ??????
6?? Microsoft ??????????????? ?? .NET
- ?????? ? ??????? ???
- ????? ???? ?? ??????? ? ????????????
- ????? ??????????? ?? ????? ????????? ?????????
??? ??????????? ??????? - ????? ?? .NET ???? ?? ??????? ????? ?? ???? Linux
? BSD ??-????????????? ?? ?????????????? (????? ?
???? ? C / C ) - ???????? ?? ???????? ?? Microsoft
- ??????? ?? ???????????
- ? ????????? ?? ????????? ?? ?????????? ??
??????????
7????????????? ?? .NET
- Microsoft .NET Framework
- ???? msdn.microsoft.com/netframework/
- DotGNU Portable.NET
- ???? http//www.dotgnu.org/
- ????????? ??????, assembler, disassembler
- ??? ??????????? ?? C ? C
- Java ? VB.NET ? ?????? ?? ??????????
- ?????? ?? ?? ???????? ??-?????????????? ??
Windows Forms - ???????? e GNU ?? ???????? ??? gcc ? ??????????
?? C, ????? ???????? native ???
8???????? Mono
- www.go-mono.com
- ??? ??????? Mono ????? Ximian ? Novell
- ??????????? ???????? ? Microsoft
9?????? ?? ??????? Mono
- ??? ?????? 1.0 ? ?? ??-???????????? .NET
Framework 1.1 - ???????? ?? C ??????????
- VB.NET ? ? ????????? ??????, ?? ??? ??? ?
?????????? - ?????????? ?????? ? 1.05 stable ? 1.1.3 unstable
- ?? ??????? ?? 2005 ?? ?????? Mono 1.2. ?? ???????
???????? ??????? - ????????? ?? Generics
- ??????? ?? C ??????????
10?????? ?? ??????? Mono
- ???? ?????? ?? ????????? ??????????
- ASP.NET 2.0 ??????????
- Remoting ?????????? ?? Whidbey
- System.XML ??????????
- ????????? ?? ?????? ?? ????????? ? ?????????
??????? - ???? ??????????? VB.NET ? JScript ?????????
- ????????????? ?? WSE1/WSE2
- System.Windows.Forms ?? ??? ??-??????? ?????????
- Mono 2.0 ? ????????? ?? 2006
- ?? ???????? ??????? .NET Framework 2.0
11?????????? ??
- ???????? ?? ??????????? ?????? ??
- RedHat Linux 9.0
- SuSe Linux
- Fedora Linux
- Mac OS X
- Microsoft Windows
- ?? ?????? ???????? ?????? ?? ?? ????????????
????????? ??? - Mono ?? ??????? ? port ????????? ?? ????????
BSD-???????? ?? - ????? ?? ?? ???????? Mono ???? ???? ?? ??????
??????????? (????. Gnoppix Linux)
12??????????? ? ????????????? ?? Mono ??? Linux
- ???? ??? ???????? ?????????? ?? Linux
- Mono ?? ????????? ????? ? ?????
13(No Transcript)
14(No Transcript)
15??????????? ? ????????????? ?? Mono ??? Linux
- ???????????? ??? Windows ? ?????
- ???????????? ????????? Windows Setup
- ??????? GTK ? Web-?????? ?? ASP.NET
- ???? ?? ?????? ? ??? cygwin (cygwin ? ???????? ??
Linux ?? Windows) - ??? cygwin ???? ?? ?? ???????????? ????-????? ??
Mono - ??? Fedora Linux ???? ?? ?? ???????? yum
repository - ???????? ?? ????????? yum
- ??????? ?? Dependency hell
16??????????? ? ????????????? ?? Mono ??? Linux
- ??? ??????????? Debian Mono ??????
- ???? ???????? ???? ?? ?????????? ??? ???
????????????? - ???????????? ?? ???????? ?? ??????? ??? ???????
- ???????? ?? ??????????? ?????
- ??? ? CVS, ?? ????? ?????? ?? ????????? ????????
??????
./configure make make install
17???????????? ?? Mono ?? C
- ?????? ?????????? ? ????? ?? C ? ???? ?? ??
???????????????? - ???????? ????????? ECMA 334 ?? C 1.0
- ?????? ?? ?? ?????????? ?? C 2.0
- ??? ?? ????????
mcs proba.cs proba.exe mcs -help man mcs
18(No Transcript)
19??????????? ?????? ?? Mono
- 32-????? JIT (Just-In-Time compiler)
- ???????? Linux/x86, Linux/PPC, Solaris/SPARC
S390 ? MacOS X - 64-????? JIT
- ???????? Linux/x86-64, Solaris/SPARCv9
- ??? ?? ???? ? Mono 1.1
- ??????????????? mint ?????? ?? ????????
????????? - Linux/86, Linux/PPC, S390, StrongARM, SPARC,
HPPA, SPARC v9
20(No Transcript)
21??????????? ?????? ?? Mono
- --optimize ???????? ?????????????
- --aot
- Ahead-of-time ????????????? ??????????? (????
ngen ? MS .NET) - ?????? ???????? ?????? ???? JIT ? ?????? ??
???????? - ??? ???? ??? ? ??-????? managed ??? native ???
- ??? GAC ???, Remoting ? ??????? ?? ????????? ??
COM ? XPCOM
22???????? ?????????? (GUI)
- Desktop ???????????? ?? ????? ??? ???
- Windows Forms ?? ?? ???????? ???????
- ????????? ?? ????? ??????????
- ????? ?? ?
- ????? ???????? ?????????? ?? ???????? ??
??????????? ?? ????? ???? ?? ????? - ???? ?? ???? ? Java AWT/Swing
23Windows Forms ??? Mono
- ? ???????? ?? ???????? ?? ?????? wine
System.Drawing (wine ????????? Windows ??????????
??? Linux) - ? ??????? ?? ?????? ?? native ????????????? ???
wine - 100 ????????? ?? Windows Forms ?? ?????? ? ????
?? 2005 - ??? ???????? ? ???????????? ?????? ?????????????
??? ?????? ????? - ?????? ?? ?? ?????????? libgdiplus ? ??????????
?????????? Cairo
24GTK
- ??? Linux ??? ?????????? ?????????? (API) ??
?????????? ?? ???????? ????????????? ?????????
GTK - GTK ???? ?? ?? ?????? ?? Mono
- GTK ? C ????????? ?? GTK
- ? GTK ?????? ?? ???????????? ????????
??????????, ???????? GTK - GTK ??? ????????????? ? ?? Windows (????.
GAIM ?? Windows)
25GNOME
- GNOME ?? ??????? ?? ?????? ? GNOME API-??
- ??-?????? ?? GTK
- ?? ?? ???????? ?? Windows
- ???????????? ? ???????? ?????????, ?????? ??
Mono, ?? ?????? ????????? - ????? ?? ?????? ??????? ?? ??????????
- ?????? ? ?? ??????????? ??????????
- ? ?????? ?????? ???????? ?? ?????????
26COCOA
- ?????????? ? ??????? ?? native look and fell ???
MacOS X
27GLADE
- ?????????? ?? GUI ?? Mono
- ??????? ????????? ????????? ?? ????????????????
?????? - ?????????? ????????? ?? ?????? ? ??????? XML
????, ? ?? ? C ????
28GLADE ???????? XML ????
lt?xml version"1.0" standalone"no"?gt lt!---
mode xml ---gt lt!DOCTYPE glade-interface SYSTEM
"http//glade.gnome.org/glade-2.0.dtd"gt ltglade-int
erfacegt ltwidget class"GtkWindow" id"window1"gt
ltproperty name"visible"gtTruelt/propertygt
ltproperty name"title" translatable"yes"gtwin2lt/pr
opertygt ltproperty name"type"gtGTK_WINDOW_TOPLEVE
Llt/propertygt ... ltchildgt ltwidget
class"GtkButton" id"button1"gt ltproperty
name"border_width"gt10lt/propertygt ltproperty
name"visible"gtTruelt/propertygt ltproperty
name"label"gtbutton1lt/propertygt ...
lt/widgetgt lt/childgt lt/widgetgt lt/glade-interfacegt
29GLADE
- ???????? ?????? ???? ?????, ???? ????? ?
??????????? ?? - ??????? ????? ?? ????????? ?? ???????? ??????????
?? ?????? ? ? Avalon ?? Microsoft ? ??????????
?????? ?? Windows Longhorn - ????????? ?? ????????? ?????????
- ????? ?? ????????? ??????? ??? ????????????? ?
???????????? ?????? - ???????? ?????????/????????? ????? ????? ??
????????? ???? ? ??? XML ???? ?? ?????????? ??
???????? ?????????
30(No Transcript)
31Glade Interface Designer
- ?????? ?? ???????????? ??????
- ????? ? ????????
- ????? ??? ?????????? ?? ??????????
- ?????????? ??????????? ???????? XML ???? ??
??????????? ?????
32??????????????? C ???
using System using Gtk using Glade using
GtkSharp public class GladeTest
Glade.Widget Button button1 public
GladeTest(string args)
Application.Init() Glade.XML gxml new
Glade.XML( "file.glade", "window2",
null) gxml.Autoconnect(this)
button1.BorderWidth 10
Application.Run() (???????? ??????????)
33??????????????? C ???
/ Connect the Signals defined in Glade /
public void OnWindowDeleteEvent(object o,
DeleteEventArgs args)
Application.Quit() args.RetVal true
public void OnButton1Clicked(System.Objec
t obj, EventArgs e)
Console.WriteLine("Button 1 clicked")
public static void Main(string args)
new GladeTest(args)
34(No Transcript)
35?????????????? Monodoc
- Monodoc e ??????? ?? ?????????????? ?? Mono ?
??????? - ???????? ?? ????? C
- Mono handbook ???????? ?? Mono ????????????
- ???????????? ?? ??????? ?? ??????????
- GTK ? GNOME
- ???????????
- ??????? ?? ???????a ?? MSDN Library
36(No Transcript)
37??????? MonoDevelop
- ???? www.monodevelop.com
- Monodevelop e ??????? ?? ??????????, ????? ??
???? ?? ????????????? ?? Mono - ???????????? ???? ?? SharpDevelop (????? ? ?????
?? ?????????? ?? .NET ??? Windows) - ?????????? ?????? ? 0.5.1
- ??????? ???????? ???????????
- ???????? ???????????? ? ???????
- ????????? ?? Java, NEMERALE (???? ???? ?? .NET) ?
HTML - ?????? Visual Studio .NET ???????
- ??? ??? ??? ??????
38(No Transcript)
39??????? ?? ?????????? Eclipse
- Eclipse e ???????? ????? ?? ?????????? (IDE)
- ?????????? ? ??????? ?? IBM, ? ??????? ???
- ????? ? ?? Java
- ?????? ?? ?????? ?? Java ????????????
- Eclipse ???? ?? ???????? plugins
- ???? plugin ?????? ??????? ??????????????
- ????????? ?? ????? ????????? ????
- ?????????? ?? ??????? ?? ???????
- code autocomplete
- ????? ?????
- Eclipse ??? plugin ?? C (????? ????)
40ADO.NET ??? Mono
- Mono ???????? ???????? ADO.NET Data Providers
- DB MySQL
- DB IBM DB2
- DB Firebird / Interbase
- DB MS SQL Server
- DB ODBC
- DB OLE DB
- DB Oracle
- DB Sybase
- DB SQL Lite
- DB PostgreSQL
41Mono ? ADO.NET ??????
- ?????????? MySql Data Provider "ByteFX"
- ???? provider ?? ??? ? ??? Windows
(http//www.bytefx.com/) - ????????? ??????? ? PHPMyAdmin ?? ???????
debian.fmi.uni-sofia.bg - ????????? ?????? ?????????? ?? ?????? ??
????????? - C ???? ? ??????? ?? ????????? ?????
(DatabaseDemo.cs)
CREATE TABLE employee( firstname varchar(32),
lastname varchar(32))
42Mono ? ADO.NET ??????
using System using System.Data using
ByteFX.Data.MySqlClient public class
DatabaseDemo const string CONNECTION_STRING
"Serverdebian.fmi.uni-sofia.bg"
"User IDtoncho" "PasswordT0n40"
"Databasetoncho" public static void
Main(string args) IDbConnection dbCon
new MySqlConnection(CONNECTION_STRING)
dbCon.Open() using (dbCon) (????????
??????????)
43Mono ? ADO.NET ??????
IDbCommand dbCmd dbCon.CreateCommand()
dbCmd.CommandText "SELECT FROM
employee" IDataReader reader
dbCmd.ExecuteReader() using (reader)
while(reader.Read())
string firstName (string)
reader"firstname" string lastName
(string) reader"lastname"
Console.WriteLine("Name 0 1",
firstName, lastName)
44(No Transcript)
45Java ??? .NET CLR
- ???? ?? ??????? www.ikvm.net
- ??? 2 ??????? ????
- Java ??????? ?? ????? ?? ?? ?????????? ???
??????????? ?????? ?? Mono - Java ???????/???????? ?? ????? ??????????? ??
Java byte ??? ?? .NET IL - ????????? ???? ?? ??? ??????? ?? Java ?? ???? ??
???? ???????????? ??? .NET - ??????
- Eclipse (Java ????????) ?????? ??? Mono
- ?? ? Windows
- Mono ?????? ??? cygwin
46(No Transcript)
47ASP.NET ??? Mono
- ??? ??? ?????? ?? ????????? ?? ASP.NET
- mod_mono ????? ??? Apache
- Apache ???????? ??????? ??????????? ? ??? ??????
?? Perl ? PHP ???????? - http//www.gotmono.net/documentation/mod-mono-howt
o.html - XSP Web ?????? ????? ?? C
- ???????? ASP.NET ????????
- ???? ????? ?? Apache
- ?????????????????? ?? XSP ???? ? ?????
- ????????? ?? ????? ASP.NET ????????, ?? ??? ???
????? ?? ?? ???????? - ??????????? ???????????? ? ??????
48??????? mod_mono
- ???? ???? ?? ????????? mod_nono ? httpd.conf ??
?????? ???????? ??????? - ?????????? ?? Apache ? ?? ???? ?? ?????? ????????
???????? http//your-server/demo/index.aspx
LoadModule mono_module modules/mod_mono.so ...
Alias /demo "/usr/share/doc/xsp/test"
MonoApplications "/demo/usr/share/doc/xsp/test"
... ltDirectory /usr/share/doc/xsp/testgt
SetHandler mono ltIfModule mod_dir.cgt
DirectoryIndex index.aspx lt/IfModulegt lt/Directorygt
49???????????? ??????? ? Mono
- Cairo
- ???????? ??????????
- Commons.Xml
- Commons.Xml.Relaxng
- Commons.Xml.Relaxng.Rnc
- Mono.Math
- BigInteger
- Mono.Math.Prime
- ?????? ?????
- Mono.Math.Prime.Generator
- ?????????? ?? ?????? ?????
50???????????? ??????? ? Mono
- Mono.Posix
- ???????? ??????????
- Mono.Security
- Mono.Security.Authenticode
- Mono.Security.Cryptography
- MD4 managed, MD5 unmanaged, RSA managed, SHA1
unmanaged - Mono.Security.Protocol.Ntlm
- Mono.Security.Protocol.Tls
- ?????? ??? SSL (Secure Socket Layer)
51???????????? ??????? ? Mono
- Mono.Security.X509
- ?????? ? ??????? ???????????
- Mono.Security.X509.Extensions
- Mono.XML
- Mono ????????? ???????? ???????? ? ????
??????/???????? - ?????????? ???????????? ??????? ?? .NET
- Mono ? ???????? ?????????????!
- ????? ???? ?? ?????? ?? ??????? ???? ???????
(????. ? Mono.Math) - ??? ???? ????????, ?? ?? ?????????????? ? ?????
Mono Framework
52Mono ??? ??? ?? ??
- ?? http//debian.fmi.uni-sofia.bg/manual/ ???
????????? ? ????????????? ????????? - Mono ? ??????????? ?? Debian.FMI
- ?????? ?? ?? ??????? ? ?? ???????? ??????????? ?
??????????? ?????? - ???????? ? ????? ????? (0.31 . . . ??? ???????,
?? ??? 1.0.4 stable) - ???? ?????? ?? ???? ??????????? ???? ??? ???????
???????
53???????? OpenFMI
- ???????? ???????? OpenFMI
- ????? http//openfmi.net
- ??????? ?? ??????? ? ??????? ???
- ??? ??? ??????? ??? ???? ?? ?? ????????? Mono
54Mono, ASP.NET, debian.fmi ??????
mono /usr/local/bin/xsp.exe root /dir1
--applications /dir2/dir3
- dir1 e ????????? ?????????? ? ???????
- dir2 e ????????????, ?????? ?? ??????? ??????
.aspx ??????? - dir3 e ??????????????? ?? ??????????? ??????????
????????? ??????????
mono /usr/local/bin/xsp.exe --root
/usr/local/share/doc/xsp/test/ --applications
//usr/local/share/doc/xsp/test/
55Mono, ASP.NET, debian.fmi ??????
- ? Mozzila/Firefox ????????? http//debian8080/in
dex.aspx - ??? ??????? ????? ????? ?????? ????? ? ?????? ??
??? ??? ??? ?? ???? ?????? - ????? ????????? ?? ???????? ?????????? ???? SSH
56Mono ???????
- ???????? ???????? ???????? ? Mono Framework-a
- www.gnomefiles.org
- ???????? ?? ???????? ????????? GTK (??? GTK ??
Windows) - ????? ????????? ? ????? ??????????, ????? ??
????? ?? ?? ????????? ??? Windows - ???? ???????? ????? ?????? ???? ???????? ??? Mono
?? Windows - Galaxium MSN ???????????
- MyBudget ?????????? ???????
- WoodPusher ???? ?? ???
- CDCollect ?????????????? ?? ???????
57(No Transcript)
58(No Transcript)
59(No Transcript)
60(No Transcript)
61Mono ??????? ??????
- Mono ????????? ???? www.go-mono.org
- ??????? MonoDevelop www.monodevelop.com
- Mono community http//www.gotmono.net
- ???????? ?? .NET ? OpenFMI
- http//explore.openfmi.net/computers/programming/d
otNET/ - ???? ??????????? ??????? mail, ?? ?? ????????
????? - Zamples ????????? Mono online
http//zamples.com/JspExplorer/samples/csharp.jsp
62MONO ???????? ????????????? ?? .NET Framework
????????