SlideShare une entreprise Scribd logo
1  sur  30
Télécharger pour lire hors ligne
Calypso browser
What’s wrong with Nautilus?
• Works only on local “live” environment
• could not browse remote image
• could not browse not loaded code (MCSnapshotBrowser)
• Very difficult to improve
• Full of spaghetti
• No model behind Nautilus
• Everything inside single class NautilusUI
Calypso navigation model
• First class scopes
• PackageScope
• ClassScope
• MethodScope
• Select scope from environment
scope := ClySystemNavigationEnvironment currentImage
selectScope: ClyClassScope of: {Collection. Set}.
• SystemScope represents global environment space
ClySystemNavigationEnvironment currentImageScope
Calypso navigation model
• First class queries
• MessageSenders
• ClassReferences
• Evaluate query in scope
scope query: (ClyMessageSenders of: #(do:))
scope query: (ClyMessageImplementors of: #(do:))
Calypso navigation model
• First class query results
• SortedClasses
• HierarchicallySortedClasses
• Specify what kind of result should be built by query
scope query: (ClyMessageSenders of: #(do:) as: ClyHierarchicallySortedMethods)
• Retrieve all available items with simple query
scope query: ClySortedMethods
scope query: ClyHierarchicallySortedMethods
Any query returns cursor
• Cursor provides stream access to underlying query
result
• caches portion of result items
• loads new portion on demand
• only cached items compute properties
• In remote scenario only cursor and cached items
are transferred to client
Cursor provides subsequent
query API
packageCursor := ClySystemNavigationEnvironment
queryCurrentImageFor: ClySortedPackages.
classCursor := packageCursor query: ClySortedClasses from: {#Kernel asPackage}.
classCursor := classesCursor query: ClyHierarchicallySortedClasses.
classCursor := classesCursor queryContentInScopeWith: 'AST-Core' asPackage.
classCursor := classesCursor queryContentInScopeWithout: 'Kernel' asPackage.
methodCursor := classCursor query: ClySortedMethods from: {Point. Array}.
methodCursor := methodCursor queryContentInNewScope: ClyClassSideScope.
Actual query result is
collection of environment items
• Environment item wraps actual object and extends it with properties:
• position in query result
• depth in query result
• domain specific properties
• ClyAbstractClassTag
• ClyOverridenMethodTag
• Environment plugins can extend properties of particular items
• ClyInheritanceAnalyzerEnvironmentPlugin marks abstract classes with
ClyAbstractClassTag
• Properties are computed lazily for portion of requested items
• it can be slow to retrieve them
Browser navigation views
• All navigation views are based on fast table
• Special data source based on cursor
• Only visible part of table are requested from cursor
• which is covered by cursor cache
• Data source describes tree structure
• what query to use to expand each kind of item
Browser navigation views
cursor := ClySystemNavigationEnvironment
queryCurrentImageFor: ClySortedPackages.
dataSource := ClyCollapsedDataSource on: cursor.
dataSource childrenStructure: {
ClyPackageScope -> ClySortedClassGroups.
ClyClassGroupScope -> ClyHierarchicallySortedClasses}.
table := FTTableMorph new.
table
extent: 200 @ 400;
dataSource: dataSource;
openInWindow.
Browser navigation state
• Most state incapsulated inside navigation data sources:
• what kind of query it represents
• method group mode or variable mode
• in what scope result are shown
• instance side or class side
• what kind of result are used
• flat methods or hierarchical methods
Browser navigation state
• First class selection represent selected objects
• ClyDataSourceSelection represents manually selected items
• ClyDataSourceHighlighting represents highlighted items
• to highlight groups of selected methods
• ClyDesiredSelection responsible to restore selected items
when data source is changed
• automatic selection of same method when new class
selected
• Selections maintain correct visible state after any changes
Browser navigation state
• No special flags like in old browser
How extend browser
• Commands
• Table decoration
• Browser tabs
• Method groups
• Class groups
Commander
• Calypso commands are based on Commander
• Every command is first class object subclass of CmdCommand with execute method
• Multiple activators can be attached to command class to declare specific way to
access command from particular application context
• CmdContextMenuCommandActivator
• CmdShortcutCommandActivator
• CmdDragAndDropCommandActivator
• ClyToolbarCommandActivator (for elements from browser toolbar)
• ClyTableIconCommandActivator (to support method icons of Nautilus)
• More http://dionisiydk.blogspot.fr/2017/04/commander-command-pattern-library.html
Command example
RenamePackageCommand>>execute
package renameTo: newName
RenamePackageCommand class>>systemBrowserShortcutActivator
<commandActivator>
^CmdShortcutCommandActivator by: $r meta for: ClyPackageSystemBrowserContext
RenamePackageCommand class>>systemBrowserMenuActivator
<commandActivator>
^CmdContextMenuCommandActivator byRootGroupItemFor: ClyPackageSystemBrowserContext
RenamePackageCommand>>defaultMenuItemName
^'Rename'
Command example
RenamePackageCommand>>prepareFullExecutionInContext: aToolContext
super prepareFullExecutionInContext: aToolContext.
package := aToolContext lastSelectedPackage.
newName := UIManager default
request: 'New name of the package'
initialAnswer: package name
title: 'Rename a package'.
newName isEmptyOrNil | (newName = package name)
ifTrue: [ ^ CmdCommandAborted signal ]
RenamePackageCommand>>canBeExecutedInContext: aToolContext
^aToolContext isPackageSelected
Drag and drop example
MoveClassToPackageCommand>>execute
classes do: [:each | package addClass: each]
MoveClassToPackageCommand class>>systemBrowserDragAndDropActivator
<commandActivator>
^CmdDragAndDropCommandActivator
for: ClyClassSystemBrowserContext toDropIn: ClyPackageSystemBrowserContext
MoveClassToPackageCommand>>prepareExecutionInDragContext: aToolContext
super prepareExecutionInDragContext: aToolContext.
classes := aToolContext selectedClasses
MoveClassToPackageCommand>>prepareExecutionInDropContext: aToolContext
super prepareExecutionInDropContext: aToolContext.
package := aToolContext lastSelectedPackage
Table decoration
• ClyTableDecorator subclasses with class side methods
ClyAbstractClassTableDecorator class>>browserContextClass
^ClyClassSystemBrowserContext
ClyAbstractClassTableDecorator class>>wantsDecorateTableCellOf: aDataSourceItem
^aDataSourceItem isMarkedWith: ClyAbstractClassTag
ClyAbstractClassTableDecorator class>>decorateTableCell: anItemCellMorph of: aDataSourceItem
| nameMorph |
nameMorph := anItemCellMorph nameMorph.
nameMorph emphasis: TextEmphasis italic emphasisCode.
nameMorph color: nameMorph color contrastingColorAdjustment contrastingColorAdjustment
Table decoration
• Commands with ClyTableIconCommandActivator
RunTestMethodCommand class>>systemBrowserTableIconActivator
<commandActivator>
^ClyTableIconCommandActivator for: ClyMethodSystemBrowserContext
RunTestMethodCommand >>buildTableCellIconFor: anItemCellMorph
testMethod isPassedTest ifTrue: [^anItemCellMorph iconNamed: #testGreenIcon].
testMethod isErrorTest ifTrue: [^anItemCellMorph iconNamed: #testRedIcon].
testMethod isFailedTest ifTrue: [^anItemCellMorph iconNamed: #testYellowIcon].
^anItemCellMorph iconNamed: #testNotRunIcon
Browser tabs
• Calypso provides multiple tools instead of single source code view
• ClyClassCreationTool
• ClyClassCommentEditorTool
• ClyClassDefinitionEditorTool
• ClyMethodCreationTool
• ClyMethodCodeEditorTool
• Tools are managed by tabs
• Tools are built in background due to nice TabsManager package
Browser tabs
• Tools are subclasses of ClyBrowserTool with #build method and
activation context where they should be applied
ClyMethodDiffTool>>build
diffMorph := DiffMorph from: self leftMethod sourceCode to: self rightMethod sourceCode.
diffMorph
contextClass: self rightMethod sourceCode;
hResizing: #spaceFill;
vResizing: #spaceFill;
showOptions: false.
self addMorph: diffMorph fullFrame: LayoutFrame identity
ClyMethodDiffTool class>>activationContextClass
^ClyMethodSystemBrowserContext
ClyMethodDiffTool class>>shouldBeActivatedInContext: aBrowserContext
^aBrowserContext selectedMethods size > 1
Demo for more tools
Method groups
• Third panel in browser shows method groups
• TaggedMethodGroups based on method tags (protocols)
• NoTagMethodGroup for unclassified methods
• ExtendedMethodGroup for all class extensions
• InheritedMethodGroup to toggle all inherited methods visibility
• SuperclassMethodGroup to toggle concrete superclass methods visibility
• ExternalPackageGroup for concrete package extending class
• VariableMethodGroup for variables mode of browser
• more
Method groups
• Method groups are built by method group providers
• Group providers are extended by environment plugins
ClyInheritanceAnalyzerEnvironmentPlugin>>collectMethodGroupProvidersFor: classes
^{ClyAbstractMethodGroupProvider. ClyOverrideMethodGroupProvider.
ClyOverriddenMethodGroupProvider. ClyRequiredMethodGroupProvider}
collect: [ :each | each classes: classes]
ClyAbstractMethodGroupProvider>>buildGroupItemsOn: items
(classes anySatisfy: [ :each | each hasAbstractMethods ])
ifFalse: [ ^self ].
items add: (ClyAbstractMethodGroup classes: classes) asEnvironmentItem
ClyAbstractMethodGroup>>includesMethod: aMethod
^aMethod sendsSelector: #subclassResponsibility
Demo for method groups
Class groups
• First panel in browser shows packages expanded
to class groups
• TaggedClassGroup based of class tags
(RPackageTag)
• NoTagClassGroup for unclassified classes
• ExtendedClassGroup for classes extended by
current package
Class groups
• Class groups are built by class group providers
• Group providers are extended by environment
plugins
ClySystemEnvironmentPlugin>>collectClassGroupProvidersFor: aPackage
^{ClyExtendedClassGroupProvider. ClyTaggedClassGroupProvider}
collect: [ :each | each package: aPackage ]
ClyExtendedClassGroupProvider>>buildGroupItemsOn: items
package extendedClassNames ifEmpty: [ ^self ].
items add: (ClyExtendedClassGroup in: package) asEnvironmentItem
What is missing
• Navigation history
• go back and forward in browser
• should works for tabs selection too
• Some commands and refactoring
• maybe we do not everything from Nautilus
• report at https://github.com/dionisiydk/Calypso/issues
The end

Contenu connexe

Tendances

Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysUnit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysDevaKumari Vijay
 
Advanced Python : Static and Class Methods
Advanced Python : Static and Class Methods Advanced Python : Static and Class Methods
Advanced Python : Static and Class Methods Bhanwar Singh Meena
 
Advance OOP concepts in Python
Advance OOP concepts in PythonAdvance OOP concepts in Python
Advance OOP concepts in PythonSujith Kumar
 
Unit 4 exceptions and threads
Unit 4 exceptions and threadsUnit 4 exceptions and threads
Unit 4 exceptions and threadsDevaKumari Vijay
 
PyParis 2017 / Camisole : A secure online sandbox to grade student - Antoine ...
PyParis 2017 / Camisole : A secure online sandbox to grade student - Antoine ...PyParis 2017 / Camisole : A secure online sandbox to grade student - Antoine ...
PyParis 2017 / Camisole : A secure online sandbox to grade student - Antoine ...Pôle Systematic Paris-Region
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteTushar B Kute
 
Pharo: Objects at your Fingertips
Pharo: Objects at your FingertipsPharo: Objects at your Fingertips
Pharo: Objects at your FingertipsMarcus Denker
 
Ruby — An introduction
Ruby — An introductionRuby — An introduction
Ruby — An introductionGonçalo Silva
 
From android/java to swift (3)
From android/java to swift (3)From android/java to swift (3)
From android/java to swift (3)allanh0526
 
FFW Gabrovo PMG - PHP OOP Part 3
FFW Gabrovo PMG - PHP OOP Part 3FFW Gabrovo PMG - PHP OOP Part 3
FFW Gabrovo PMG - PHP OOP Part 3Toni Kolev
 
introduction to c #
introduction to c #introduction to c #
introduction to c #Sireesh K
 

Tendances (20)

Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysUnit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
 
Advanced Python : Static and Class Methods
Advanced Python : Static and Class Methods Advanced Python : Static and Class Methods
Advanced Python : Static and Class Methods
 
Advance OOP concepts in Python
Advance OOP concepts in PythonAdvance OOP concepts in Python
Advance OOP concepts in Python
 
Java
Java Java
Java
 
Unit 4 exceptions and threads
Unit 4 exceptions and threadsUnit 4 exceptions and threads
Unit 4 exceptions and threads
 
Metaprogramming in Ruby
Metaprogramming in RubyMetaprogramming in Ruby
Metaprogramming in Ruby
 
PyParis 2017 / Camisole : A secure online sandbox to grade student - Antoine ...
PyParis 2017 / Camisole : A secure online sandbox to grade student - Antoine ...PyParis 2017 / Camisole : A secure online sandbox to grade student - Antoine ...
PyParis 2017 / Camisole : A secure online sandbox to grade student - Antoine ...
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
 
Java
JavaJava
Java
 
core java
core javacore java
core java
 
Unit 5 java-awt (1)
Unit 5 java-awt (1)Unit 5 java-awt (1)
Unit 5 java-awt (1)
 
Reversing JavaScript
Reversing JavaScriptReversing JavaScript
Reversing JavaScript
 
Pharo: Objects at your Fingertips
Pharo: Objects at your FingertipsPharo: Objects at your Fingertips
Pharo: Objects at your Fingertips
 
Csharp_mahesh
Csharp_maheshCsharp_mahesh
Csharp_mahesh
 
Ruby — An introduction
Ruby — An introductionRuby — An introduction
Ruby — An introduction
 
From android/java to swift (3)
From android/java to swift (3)From android/java to swift (3)
From android/java to swift (3)
 
FFW Gabrovo PMG - PHP OOP Part 3
FFW Gabrovo PMG - PHP OOP Part 3FFW Gabrovo PMG - PHP OOP Part 3
FFW Gabrovo PMG - PHP OOP Part 3
 
introduction to c #
introduction to c #introduction to c #
introduction to c #
 
Session 09 - OOPS
Session 09 - OOPSSession 09 - OOPS
Session 09 - OOPS
 
Sonu wiziq
Sonu wiziqSonu wiziq
Sonu wiziq
 

Similaire à Calypso Browser

Calypso underhood
 Calypso underhood Calypso underhood
Calypso underhoodESUG
 
td_mxc_rubyrails_shin
td_mxc_rubyrails_shintd_mxc_rubyrails_shin
td_mxc_rubyrails_shintutorialsruby
 
td_mxc_rubyrails_shin
td_mxc_rubyrails_shintd_mxc_rubyrails_shin
td_mxc_rubyrails_shintutorialsruby
 
Benchmarking Solr Performance at Scale
Benchmarking Solr Performance at ScaleBenchmarking Solr Performance at Scale
Benchmarking Solr Performance at Scalethelabdude
 
DDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVCDDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVCAndy Butland
 
Django introduction @ UGent
Django introduction @ UGentDjango introduction @ UGent
Django introduction @ UGentkevinvw
 
Leveraging the Chaos tool suite for module development
Leveraging the Chaos tool suite  for module developmentLeveraging the Chaos tool suite  for module development
Leveraging the Chaos tool suite for module developmentzroger
 
Pursuing Performance in Store
Pursuing Performance in StorePursuing Performance in Store
Pursuing Performance in StoreESUG
 
Alex Dias: how to build a docker monitoring solution
Alex Dias: how to build a docker monitoring solution Alex Dias: how to build a docker monitoring solution
Alex Dias: how to build a docker monitoring solution Outlyer
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Ryan Cuprak
 
Java 102 intro to object-oriented programming in java
Java 102   intro to object-oriented programming in javaJava 102   intro to object-oriented programming in java
Java 102 intro to object-oriented programming in javaagorolabs
 
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve content
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve contentOpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve content
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve contentAlkacon Software GmbH & Co. KG
 
Deep dive in Citrix Troubleshooting
Deep dive in Citrix TroubleshootingDeep dive in Citrix Troubleshooting
Deep dive in Citrix TroubleshootingDenis Gundarev
 
Apache zookeeper seminar_trinh_viet_dung_03_2016
Apache zookeeper seminar_trinh_viet_dung_03_2016Apache zookeeper seminar_trinh_viet_dung_03_2016
Apache zookeeper seminar_trinh_viet_dung_03_2016Viet-Dung TRINH
 
Tools and Tips for Moodle Developers - #mootus16
 Tools and Tips for Moodle Developers - #mootus16 Tools and Tips for Moodle Developers - #mootus16
Tools and Tips for Moodle Developers - #mootus16Dan Poltawski
 

Similaire à Calypso Browser (20)

Calypso underhood
 Calypso underhood Calypso underhood
Calypso underhood
 
td_mxc_rubyrails_shin
td_mxc_rubyrails_shintd_mxc_rubyrails_shin
td_mxc_rubyrails_shin
 
td_mxc_rubyrails_shin
td_mxc_rubyrails_shintd_mxc_rubyrails_shin
td_mxc_rubyrails_shin
 
CodeIgniter & MVC
CodeIgniter & MVCCodeIgniter & MVC
CodeIgniter & MVC
 
Benchmarking Solr Performance at Scale
Benchmarking Solr Performance at ScaleBenchmarking Solr Performance at Scale
Benchmarking Solr Performance at Scale
 
DDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVCDDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVC
 
Django introduction @ UGent
Django introduction @ UGentDjango introduction @ UGent
Django introduction @ UGent
 
VB.net&OOP.pptx
VB.net&OOP.pptxVB.net&OOP.pptx
VB.net&OOP.pptx
 
Leveraging the Chaos tool suite for module development
Leveraging the Chaos tool suite  for module developmentLeveraging the Chaos tool suite  for module development
Leveraging the Chaos tool suite for module development
 
Introduction to Monsoon PHP framework
Introduction to Monsoon PHP frameworkIntroduction to Monsoon PHP framework
Introduction to Monsoon PHP framework
 
Pursuing Performance in Store
Pursuing Performance in StorePursuing Performance in Store
Pursuing Performance in Store
 
06.1 .Net memory management
06.1 .Net memory management06.1 .Net memory management
06.1 .Net memory management
 
Alex Dias: how to build a docker monitoring solution
Alex Dias: how to build a docker monitoring solution Alex Dias: how to build a docker monitoring solution
Alex Dias: how to build a docker monitoring solution
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
 
Java 102 intro to object-oriented programming in java
Java 102   intro to object-oriented programming in javaJava 102   intro to object-oriented programming in java
Java 102 intro to object-oriented programming in java
 
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve content
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve contentOpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve content
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve content
 
Deep dive in Citrix Troubleshooting
Deep dive in Citrix TroubleshootingDeep dive in Citrix Troubleshooting
Deep dive in Citrix Troubleshooting
 
Apache zookeeper seminar_trinh_viet_dung_03_2016
Apache zookeeper seminar_trinh_viet_dung_03_2016Apache zookeeper seminar_trinh_viet_dung_03_2016
Apache zookeeper seminar_trinh_viet_dung_03_2016
 
Apache Zookeeper
Apache ZookeeperApache Zookeeper
Apache Zookeeper
 
Tools and Tips for Moodle Developers - #mootus16
 Tools and Tips for Moodle Developers - #mootus16 Tools and Tips for Moodle Developers - #mootus16
Tools and Tips for Moodle Developers - #mootus16
 

Plus de Pharo

Yesplan: 10 Years later
Yesplan: 10 Years laterYesplan: 10 Years later
Yesplan: 10 Years laterPharo
 
Object-Centric Debugging: a preview
Object-Centric Debugging: a previewObject-Centric Debugging: a preview
Object-Centric Debugging: a previewPharo
 
The future of testing in Pharo
The future of testing in PharoThe future of testing in Pharo
The future of testing in PharoPharo
 
Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI Pharo
 
UI Testing with Spec
 UI Testing with Spec UI Testing with Spec
UI Testing with SpecPharo
 
Pharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alphaPharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alphaPharo
 
PHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPharo
 
Easy REST with OpenAPI
Easy REST with OpenAPIEasy REST with OpenAPI
Easy REST with OpenAPIPharo
 
Comment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlComment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlPharo
 
apart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksapart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksPharo
 
XmppTalk
XmppTalkXmppTalk
XmppTalkPharo
 
A living programming environment for blockchain
A living programming environment for blockchainA living programming environment for blockchain
A living programming environment for blockchainPharo
 
Raspberry and Pharo
Raspberry and PharoRaspberry and Pharo
Raspberry and PharoPharo
 
Welcome: PharoDays 2017
Welcome: PharoDays 2017Welcome: PharoDays 2017
Welcome: PharoDays 2017Pharo
 
Pharo 6
Pharo 6Pharo 6
Pharo 6Pharo
 
Robotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with PharoRobotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with PharoPharo
 
Pharo 64bits
Pharo 64bitsPharo 64bits
Pharo 64bitsPharo
 
Smack: Behind the Refactorings
Smack: Behind the RefactoringsSmack: Behind the Refactorings
Smack: Behind the RefactoringsPharo
 
Pharo VM Performance
Pharo VM PerformancePharo VM Performance
Pharo VM PerformancePharo
 
Git with Style
Git with StyleGit with Style
Git with StylePharo
 

Plus de Pharo (20)

Yesplan: 10 Years later
Yesplan: 10 Years laterYesplan: 10 Years later
Yesplan: 10 Years later
 
Object-Centric Debugging: a preview
Object-Centric Debugging: a previewObject-Centric Debugging: a preview
Object-Centric Debugging: a preview
 
The future of testing in Pharo
The future of testing in PharoThe future of testing in Pharo
The future of testing in Pharo
 
Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI Spec 2.0: The next step on desktop UI
Spec 2.0: The next step on desktop UI
 
UI Testing with Spec
 UI Testing with Spec UI Testing with Spec
UI Testing with Spec
 
Pharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alphaPharo 7.0 and 8.0 alpha
Pharo 7.0 and 8.0 alpha
 
PHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous Integration
 
Easy REST with OpenAPI
Easy REST with OpenAPIEasy REST with OpenAPI
Easy REST with OpenAPI
 
Comment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowlComment soup with a pinch of types, served in a leaky bowl
Comment soup with a pinch of types, served in a leaky bowl
 
apart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorksapart Framework: Porting from VisualWorks
apart Framework: Porting from VisualWorks
 
XmppTalk
XmppTalkXmppTalk
XmppTalk
 
A living programming environment for blockchain
A living programming environment for blockchainA living programming environment for blockchain
A living programming environment for blockchain
 
Raspberry and Pharo
Raspberry and PharoRaspberry and Pharo
Raspberry and Pharo
 
Welcome: PharoDays 2017
Welcome: PharoDays 2017Welcome: PharoDays 2017
Welcome: PharoDays 2017
 
Pharo 6
Pharo 6Pharo 6
Pharo 6
 
Robotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with PharoRobotic Exploration and Mapping with Pharo
Robotic Exploration and Mapping with Pharo
 
Pharo 64bits
Pharo 64bitsPharo 64bits
Pharo 64bits
 
Smack: Behind the Refactorings
Smack: Behind the RefactoringsSmack: Behind the Refactorings
Smack: Behind the Refactorings
 
Pharo VM Performance
Pharo VM PerformancePharo VM Performance
Pharo VM Performance
 
Git with Style
Git with StyleGit with Style
Git with Style
 

Dernier

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 

Dernier (20)

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 

Calypso Browser

  • 2. What’s wrong with Nautilus? • Works only on local “live” environment • could not browse remote image • could not browse not loaded code (MCSnapshotBrowser) • Very difficult to improve • Full of spaghetti • No model behind Nautilus • Everything inside single class NautilusUI
  • 3. Calypso navigation model • First class scopes • PackageScope • ClassScope • MethodScope • Select scope from environment scope := ClySystemNavigationEnvironment currentImage selectScope: ClyClassScope of: {Collection. Set}. • SystemScope represents global environment space ClySystemNavigationEnvironment currentImageScope
  • 4. Calypso navigation model • First class queries • MessageSenders • ClassReferences • Evaluate query in scope scope query: (ClyMessageSenders of: #(do:)) scope query: (ClyMessageImplementors of: #(do:))
  • 5. Calypso navigation model • First class query results • SortedClasses • HierarchicallySortedClasses • Specify what kind of result should be built by query scope query: (ClyMessageSenders of: #(do:) as: ClyHierarchicallySortedMethods) • Retrieve all available items with simple query scope query: ClySortedMethods scope query: ClyHierarchicallySortedMethods
  • 6. Any query returns cursor • Cursor provides stream access to underlying query result • caches portion of result items • loads new portion on demand • only cached items compute properties • In remote scenario only cursor and cached items are transferred to client
  • 7. Cursor provides subsequent query API packageCursor := ClySystemNavigationEnvironment queryCurrentImageFor: ClySortedPackages. classCursor := packageCursor query: ClySortedClasses from: {#Kernel asPackage}. classCursor := classesCursor query: ClyHierarchicallySortedClasses. classCursor := classesCursor queryContentInScopeWith: 'AST-Core' asPackage. classCursor := classesCursor queryContentInScopeWithout: 'Kernel' asPackage. methodCursor := classCursor query: ClySortedMethods from: {Point. Array}. methodCursor := methodCursor queryContentInNewScope: ClyClassSideScope.
  • 8. Actual query result is collection of environment items • Environment item wraps actual object and extends it with properties: • position in query result • depth in query result • domain specific properties • ClyAbstractClassTag • ClyOverridenMethodTag • Environment plugins can extend properties of particular items • ClyInheritanceAnalyzerEnvironmentPlugin marks abstract classes with ClyAbstractClassTag • Properties are computed lazily for portion of requested items • it can be slow to retrieve them
  • 9. Browser navigation views • All navigation views are based on fast table • Special data source based on cursor • Only visible part of table are requested from cursor • which is covered by cursor cache • Data source describes tree structure • what query to use to expand each kind of item
  • 10. Browser navigation views cursor := ClySystemNavigationEnvironment queryCurrentImageFor: ClySortedPackages. dataSource := ClyCollapsedDataSource on: cursor. dataSource childrenStructure: { ClyPackageScope -> ClySortedClassGroups. ClyClassGroupScope -> ClyHierarchicallySortedClasses}. table := FTTableMorph new. table extent: 200 @ 400; dataSource: dataSource; openInWindow.
  • 11. Browser navigation state • Most state incapsulated inside navigation data sources: • what kind of query it represents • method group mode or variable mode • in what scope result are shown • instance side or class side • what kind of result are used • flat methods or hierarchical methods
  • 12. Browser navigation state • First class selection represent selected objects • ClyDataSourceSelection represents manually selected items • ClyDataSourceHighlighting represents highlighted items • to highlight groups of selected methods • ClyDesiredSelection responsible to restore selected items when data source is changed • automatic selection of same method when new class selected • Selections maintain correct visible state after any changes
  • 13. Browser navigation state • No special flags like in old browser
  • 14. How extend browser • Commands • Table decoration • Browser tabs • Method groups • Class groups
  • 15. Commander • Calypso commands are based on Commander • Every command is first class object subclass of CmdCommand with execute method • Multiple activators can be attached to command class to declare specific way to access command from particular application context • CmdContextMenuCommandActivator • CmdShortcutCommandActivator • CmdDragAndDropCommandActivator • ClyToolbarCommandActivator (for elements from browser toolbar) • ClyTableIconCommandActivator (to support method icons of Nautilus) • More http://dionisiydk.blogspot.fr/2017/04/commander-command-pattern-library.html
  • 16. Command example RenamePackageCommand>>execute package renameTo: newName RenamePackageCommand class>>systemBrowserShortcutActivator <commandActivator> ^CmdShortcutCommandActivator by: $r meta for: ClyPackageSystemBrowserContext RenamePackageCommand class>>systemBrowserMenuActivator <commandActivator> ^CmdContextMenuCommandActivator byRootGroupItemFor: ClyPackageSystemBrowserContext RenamePackageCommand>>defaultMenuItemName ^'Rename'
  • 17. Command example RenamePackageCommand>>prepareFullExecutionInContext: aToolContext super prepareFullExecutionInContext: aToolContext. package := aToolContext lastSelectedPackage. newName := UIManager default request: 'New name of the package' initialAnswer: package name title: 'Rename a package'. newName isEmptyOrNil | (newName = package name) ifTrue: [ ^ CmdCommandAborted signal ] RenamePackageCommand>>canBeExecutedInContext: aToolContext ^aToolContext isPackageSelected
  • 18. Drag and drop example MoveClassToPackageCommand>>execute classes do: [:each | package addClass: each] MoveClassToPackageCommand class>>systemBrowserDragAndDropActivator <commandActivator> ^CmdDragAndDropCommandActivator for: ClyClassSystemBrowserContext toDropIn: ClyPackageSystemBrowserContext MoveClassToPackageCommand>>prepareExecutionInDragContext: aToolContext super prepareExecutionInDragContext: aToolContext. classes := aToolContext selectedClasses MoveClassToPackageCommand>>prepareExecutionInDropContext: aToolContext super prepareExecutionInDropContext: aToolContext. package := aToolContext lastSelectedPackage
  • 19. Table decoration • ClyTableDecorator subclasses with class side methods ClyAbstractClassTableDecorator class>>browserContextClass ^ClyClassSystemBrowserContext ClyAbstractClassTableDecorator class>>wantsDecorateTableCellOf: aDataSourceItem ^aDataSourceItem isMarkedWith: ClyAbstractClassTag ClyAbstractClassTableDecorator class>>decorateTableCell: anItemCellMorph of: aDataSourceItem | nameMorph | nameMorph := anItemCellMorph nameMorph. nameMorph emphasis: TextEmphasis italic emphasisCode. nameMorph color: nameMorph color contrastingColorAdjustment contrastingColorAdjustment
  • 20. Table decoration • Commands with ClyTableIconCommandActivator RunTestMethodCommand class>>systemBrowserTableIconActivator <commandActivator> ^ClyTableIconCommandActivator for: ClyMethodSystemBrowserContext RunTestMethodCommand >>buildTableCellIconFor: anItemCellMorph testMethod isPassedTest ifTrue: [^anItemCellMorph iconNamed: #testGreenIcon]. testMethod isErrorTest ifTrue: [^anItemCellMorph iconNamed: #testRedIcon]. testMethod isFailedTest ifTrue: [^anItemCellMorph iconNamed: #testYellowIcon]. ^anItemCellMorph iconNamed: #testNotRunIcon
  • 21. Browser tabs • Calypso provides multiple tools instead of single source code view • ClyClassCreationTool • ClyClassCommentEditorTool • ClyClassDefinitionEditorTool • ClyMethodCreationTool • ClyMethodCodeEditorTool • Tools are managed by tabs • Tools are built in background due to nice TabsManager package
  • 22. Browser tabs • Tools are subclasses of ClyBrowserTool with #build method and activation context where they should be applied ClyMethodDiffTool>>build diffMorph := DiffMorph from: self leftMethod sourceCode to: self rightMethod sourceCode. diffMorph contextClass: self rightMethod sourceCode; hResizing: #spaceFill; vResizing: #spaceFill; showOptions: false. self addMorph: diffMorph fullFrame: LayoutFrame identity ClyMethodDiffTool class>>activationContextClass ^ClyMethodSystemBrowserContext ClyMethodDiffTool class>>shouldBeActivatedInContext: aBrowserContext ^aBrowserContext selectedMethods size > 1
  • 23. Demo for more tools
  • 24. Method groups • Third panel in browser shows method groups • TaggedMethodGroups based on method tags (protocols) • NoTagMethodGroup for unclassified methods • ExtendedMethodGroup for all class extensions • InheritedMethodGroup to toggle all inherited methods visibility • SuperclassMethodGroup to toggle concrete superclass methods visibility • ExternalPackageGroup for concrete package extending class • VariableMethodGroup for variables mode of browser • more
  • 25. Method groups • Method groups are built by method group providers • Group providers are extended by environment plugins ClyInheritanceAnalyzerEnvironmentPlugin>>collectMethodGroupProvidersFor: classes ^{ClyAbstractMethodGroupProvider. ClyOverrideMethodGroupProvider. ClyOverriddenMethodGroupProvider. ClyRequiredMethodGroupProvider} collect: [ :each | each classes: classes] ClyAbstractMethodGroupProvider>>buildGroupItemsOn: items (classes anySatisfy: [ :each | each hasAbstractMethods ]) ifFalse: [ ^self ]. items add: (ClyAbstractMethodGroup classes: classes) asEnvironmentItem ClyAbstractMethodGroup>>includesMethod: aMethod ^aMethod sendsSelector: #subclassResponsibility
  • 26. Demo for method groups
  • 27. Class groups • First panel in browser shows packages expanded to class groups • TaggedClassGroup based of class tags (RPackageTag) • NoTagClassGroup for unclassified classes • ExtendedClassGroup for classes extended by current package
  • 28. Class groups • Class groups are built by class group providers • Group providers are extended by environment plugins ClySystemEnvironmentPlugin>>collectClassGroupProvidersFor: aPackage ^{ClyExtendedClassGroupProvider. ClyTaggedClassGroupProvider} collect: [ :each | each package: aPackage ] ClyExtendedClassGroupProvider>>buildGroupItemsOn: items package extendedClassNames ifEmpty: [ ^self ]. items add: (ClyExtendedClassGroup in: package) asEnvironmentItem
  • 29. What is missing • Navigation history • go back and forward in browser • should works for tabs selection too • Some commands and refactoring • maybe we do not everything from Nautilus • report at https://github.com/dionisiydk/Calypso/issues