The paper presents the authors ongoing efforts to develop a robust and efficient numerical methodology, and the associated expert software, for analysis, design and optimization of hydrofoil cascades. We developed, so far, a Finite Element solver with streamfunction formulation for incompressible, inviscid and irrotational cascade flow, using a modern software infrastructure, and efficient implementation. Two test cases will be presented to evaluate the accuracy of our CASCADExpert code. In the first case, our code is tested for a thin hydrofoil cascade designed with the quasi-analytical approach. Second, the blade loading and thickness distributions obtain with our code from a given hydrofoil shape are used in an inverse design method. As a result, an optimized hydrofoil cascade is obtained. The pressure distribution on the original and optimized hydrofoil cascades is compared. We have applied the method in order to optimize the turbine and pump hydrofoil cascades, respectively. Consequently, a new method is developed in order to generate the optimized hydrofoil cascade geometry for hydraulic machinery.